Skip to content

Commit

Permalink
Log ZTS test name to dmesg
Browse files Browse the repository at this point in the history
Log each test name to dmesg to help post-mortem test failures.
Specifically, to help debug #10940.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
tonyhutter committed Sep 18, 2020
1 parent a57f954 commit 9d10660
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TEST
Expand Up @@ -5,21 +5,21 @@
#TEST_PREPARE_SHARES="yes"

### ztest
#TEST_ZTEST_SKIP="yes"
TEST_ZTEST_SKIP="yes"
#TEST_ZTEST_TIMEOUT=1800
#TEST_ZTEST_DIR="/var/tmp/"
#TEST_ZTEST_OPTIONS="-V"
#TEST_ZTEST_CORE_DIR="/mnt/zloop"

### zimport
#TEST_ZIMPORT_SKIP="yes"
TEST_ZIMPORT_SKIP="yes"
#TEST_ZIMPORT_DIR="/var/tmp/zimport"
#TEST_ZIMPORT_VERSIONS="master installed"
#TEST_ZIMPORT_POOLS="zol-0.6.1 zol-0.6.2 master installed"
#TEST_ZIMPORT_OPTIONS="-c"

### xfstests
#TEST_XFSTESTS_SKIP="yes"
TEST_XFSTESTS_SKIP="yes"
#TEST_XFSTESTS_URL="https://github.com/behlendorf/xfstests/archive/"
#TEST_XFSTESTS_VER="zfs.tar.gz"
#TEST_XFSTESTS_POOL="tank"
Expand All @@ -38,7 +38,7 @@
#TEST_ZFSTESTS_TAGS="functional"

### zfsstress
#TEST_ZFSSTRESS_SKIP="yes"
TEST_ZFSSTRESS_SKIP="yes"
#TEST_ZFSSTRESS_URL="https://github.com/nedbass/zfsstress/archive/"
#TEST_ZFSSTRESS_VER="master.tar.gz"
#TEST_ZFSSTRESS_RUNTIME=300
Expand Down
4 changes: 4 additions & 0 deletions tests/test-runner/bin/test-runner.py.in
Expand Up @@ -276,6 +276,10 @@ User: %s
except OSError as e:
fail('%s' % e)

# On Linux, write the test name to dmesg for bug post-mortem
mycmd="sudo ksh -c \"if [[ -e /dev/kmsg ]] ; then echo ZTS running: %s > /dev/kmsg; fi\"" % self.pathname
os.system(mycmd)

self.result.starttime = monotonic_time()
proc = Popen(privcmd, stdout=PIPE, stderr=PIPE)
# Allow a special timeout value of 0 to mean infinity
Expand Down

0 comments on commit 9d10660

Please sign in to comment.