Todd Lipcon has submitted this change and it was merged. ( )

Change subject: Fix tests leaving behind diagnostics logs

Fix tests leaving behind diagnostics logs

Prior to this patch, if tests are run with TEST_TMPDIR set, tests which
use an internal minicluster could leave behind a diagnostics log file.
The issue was the following:

- GLog has some code which defaults FLAGS_log_dir to the the
  $TEST_TMPDIR environment variable.
- Since we enabled the diagnosics log by default, this meant that
  minicluster servers would start logging into $TEST_TMPDIR directly
- Our test harness only takes care of cleaning up the test-case-specific
  directory rather than the top-level $TEST_TMPDIR

The fix here is to make our own test harness override FLAGS_log_dir to
point to the test-specific directory.

Tested by setting TEST_TMPDIR and running tablet_server-test. Before the
patch, it left some files behind. With the patch, it did not. I couldn't
write an easy automated test since the initialization of FLAGS_log_dir
happens during glog's static constructors.

Change-Id: Ic68826f652c7aefce1314d9e3481b11666f2699f
Reviewed-by: Adar Dembo <>
Tested-by: Todd Lipcon <>
M src/kudu/master/
M src/kudu/util/
2 files changed, 10 insertions(+), 1 deletion(-)

  Adar Dembo: Looks good to me, approved
  Todd Lipcon: Verified

To view, visit
To unsubscribe, visit

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic68826f652c7aefce1314d9e3481b11666f2699f
Gerrit-Change-Number: 9592
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <>
Gerrit-Reviewer: Adar Dembo <>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <>

Reply via email to