diff options
author | Brian Behlendorf <[email protected]> | 2018-06-20 14:03:13 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2018-06-20 14:03:13 -0700 |
commit | e4a3297a044ebafe467e6edda6096a784a0e1848 (patch) | |
tree | b99d11702d85e9eda0132adcc7ad8531260c14ba /scripts/zfs-tests.sh | |
parent | 1c38ac61e1dbc876eb4079a69f965bb51635fef7 (diff) |
ZTS: Adopt OpenZFS test analysis script
Adopt and extend the OpenZFS ZTS results analysis script for use
with ZFS on Linux. This allows for automatic analysis of tests
which may be skipped for a variety or reasons or which are not
entirely reliable.
In addition to the list of 'known' failures, which have been updated
for ZFS on Linux, there in a new 'maybe' section. This mapping
include tests which might be correctly skipped depending on the
test environment. This may be because of a missing dependency or
lack of required kernel support. This list also includes tests
which normally pass but might on occasion fail for a harmless
reason.
The script was also extended include a reason for why a given test
might be skipped or may fail. The reason will be included after
the test in the "results other than PASS that are expected" section.
For failures it is preferable to set the reason to the GitHub issue
number and for skipped tests several generic reasons are available.
You may also specify a custom reason if needed.
All tests were added back in to the linux.run file even if they are
expected to failed. There is value in running tests which may not
pass, the expected results for these tests has been encoded in
the new analysis script.
All tests which were disabled because they ran more slowly on a
32-bit system have been re-enabled. Developers working on 32-bit
systems should assess what it reasonable for their environment.
The unnecessary dependency on physical block devices was removed for
the checksum, grow_pool, and grow_replicas test groups so they are
no longer skipped. Updated the filetest_001_pos test case to run
properly now that it is enabled and moved the grow tests in to a
single directory.
Reviewed-by: Prakash Surya <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #7638
Diffstat (limited to 'scripts/zfs-tests.sh')
-rwxr-xr-x | scripts/zfs-tests.sh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh index 22ca31d61..6fdd658f7 100755 --- a/scripts/zfs-tests.sh +++ b/scripts/zfs-tests.sh @@ -575,12 +575,31 @@ export __ZFS_POOL_EXCLUDE export TESTFAIL_CALLBACKS export PATH=$STF_PATH +RESULTS_FILE=$(mktemp -u -t zts-results.XXXX -p "$FILEDIR") +REPORT_FILE=$(mktemp -u -t zts-report.XXXX -p "$FILEDIR") + +# +# Run all the tests as specified. +# msg "${TEST_RUNNER} ${QUIET} -c ${RUNFILE} -T ${TAGS} -i ${STF_SUITE}" \ "-I ${ITERATIONS}" ${TEST_RUNNER} ${QUIET} -c "${RUNFILE}" -T "${TAGS}" -i "${STF_SUITE}" \ - -I "${ITERATIONS}" + -I "${ITERATIONS}" 2>&1 | tee "$RESULTS_FILE" + +# +# Analyze the results. +# +set -o pipefail +${ZTS_REPORT} "$RESULTS_FILE" | tee "$REPORT_FILE" RESULT=$? -echo +set +o pipefail + +RESULTS_DIR=$(awk '/^Log directory/ { print $3 }' "$RESULTS_FILE") +if [ -d "$RESULTS_DIR" ]; then + cat "$RESULTS_FILE" "$REPORT_FILE" >"$RESULTS_DIR/results" +fi + +rm -f "$RESULTS_FILE" "$REPORT_FILE" if [ ${#SINGLETEST[@]} -ne 0 ]; then rm -f "$RUNFILE" &>/dev/null |