kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/2] kudu git commit: run-test.sh: treat empty gzipped output files as text files
Date Fri, 13 Apr 2018 20:00:40 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 0ddb860d0 -> 5df9c9e0f

run-test.sh: treat empty gzipped output files as text files

I saw a test run where pstack_watcher-test timed out and gzip didn't produce
any output. Thus, we ended up with an empty pstack_watcher-test.txt.gz file
which is corrupt by definition; there should at least be a gzip header.

If this happens, let's treat the empty file as an empty text file so that
subsequent output file post-processing (which uses commands like zcat/zgrep)
doesn't fail.

Importantly, the pstack_watcher-test timeout does NOT benefit from this fix.
That's because pstack_watcher-test was being traced by gdb, so it couldn't
deliver itself a SIGABRT to timeout after 900 seconds. Instead, ctest killed
it after 930 seconds by sending a SIGKILL to run-test.sh itself, thus
preventing this cleanup code from running.

Change-Id: I0fbe13982412f9113b27afbc40635f8945c45f09
Reviewed-on: http://gerrit.cloudera.org:8080/10062
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>

Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/3aa1070e
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/3aa1070e
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/3aa1070e

Branch: refs/heads/master
Commit: 3aa1070eef3bf981b87084c2a9ea91ca881829f6
Parents: 0ddb860
Author: Adar Dembo <adar@cloudera.com>
Authored: Thu Apr 12 10:12:07 2018 -0700
Committer: Todd Lipcon <todd@apache.org>
Committed: Fri Apr 13 19:53:59 2018 +0000

 build-support/run-test.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/build-support/run-test.sh b/build-support/run-test.sh
index dd91c1e..bd33b6b 100755
--- a/build-support/run-test.sh
+++ b/build-support/run-test.sh
@@ -184,6 +184,15 @@ for ATTEMPT_NUMBER in $(seq 1 $TEST_EXECUTION_ATTEMPTS) ; do
     | $pipe_cmd > $LOGFILE
+  # An empty gzipped file is corrupt because even a logically empty gzipped file
+  # should contain at least the gzip header. If we detect this, treat the test
+  # log output as a plain text file.
+  if [[ -f $LOGFILE && ! -s $LOGFILE && $LOGFILE =~ .gz$ ]]; then
+  fi
   # TSAN doesn't always exit with a non-zero exit code due to a bug:
   # mutex errors don't get reported through the normal error reporting infrastructure.
   # So we make sure to detect this and exit 1.

View raw message