From 142a5010ab65b8622619bb831c906cbc21b82b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 2 Feb 2022 23:17:46 +0100 Subject: [PATCH] Notice if the test-runner dies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, we seem to only care if the results collector errors. We also should care if the test-runner died. Authored-by: Rich Ercolani Co-authored-by: Rich Ercolani Reviewed-by: Damian Szuberski Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12998 --- scripts/zfs-tests.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh index aaaf9ddfc2..8c1b511664 100755 --- a/scripts/zfs-tests.sh +++ b/scripts/zfs-tests.sh @@ -700,12 +700,14 @@ msg "${TEST_RUNNER} ${QUIET:+-q}" \ "-T \"${TAGS}\"" \ "-i \"${STF_SUITE}\"" \ "-I \"${ITERATIONS}\"" -${TEST_RUNNER} ${QUIET:+-q} \ +{ ${TEST_RUNNER} ${QUIET:+-q} \ -c "${RUNFILES}" \ -T "${TAGS}" \ -i "${STF_SUITE}" \ -I "${ITERATIONS}" \ - 2>&1 | tee "$RESULTS_FILE" + 2>&1; echo $? >"$REPORT_FILE"; } | tee "$RESULTS_FILE" +read -r RUNRESULT <"$REPORT_FILE" + # # Analyze the results. # @@ -720,13 +722,14 @@ if [ "$RESULT" -eq "2" ] && [ -n "$RERUN" ]; then for test_name in $MAYBES; do grep "$test_name " "$TEMP_RESULTS_FILE" >>"$TEST_LIST" done - ${TEST_RUNNER} ${QUIET:+-q} \ + { ${TEST_RUNNER} ${QUIET:+-q} \ -c "${RUNFILES}" \ -T "${TAGS}" \ -i "${STF_SUITE}" \ -I "${ITERATIONS}" \ -l "${TEST_LIST}" \ - 2>&1 | tee "$RESULTS_FILE" + 2>&1; echo $? >"$REPORT_FILE"; } | tee "$RESULTS_FILE" + read -r RUNRESULT <"$REPORT_FILE" # # Analyze the results. # @@ -748,4 +751,4 @@ if [ -n "$SINGLETEST" ]; then rm -f "$RUNFILES" >/dev/null 2>&1 fi -exit "${RESULT}" +[ "$RUNRESULT" -gt 3 ] && exit "$RUNRESULT" || exit "$RESULT"