From: James Nunez Date: Fri, 24 Jul 2020 20:13:39 +0000 (-0600) Subject: LU-13773 tests: subscript failure propagation X-Git-Tag: 2.13.56~70 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e2cb43c409b98b97fdb84a678a93651d2176b242 LU-13773 tests: subscript failure propagation When a test script calls another test script and there is a failure in the called test script, the failure is not propagated up to the main/calling test suite and Maloo is not registering the failed test. An example of this is sanity-dom calls sanity and sanityn, but, if a sanity test fails, Maloo does not recognize the sanity failure. Signed-off-by: James Nunez Change-Id: I1914ecbece469cc1faffdffa4c980241ba3020b2 Reviewed-on: https://review.whamcloud.com/39409 Reviewed-by: Wei Liu Reviewed-by: Jian Yu Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-dom.sh b/lustre/tests/sanity-dom.sh index a95d62b..9385c21 100644 --- a/lustre/tests/sanity-dom.sh +++ b/lustre/tests/sanity-dom.sh @@ -206,4 +206,4 @@ run_test sanityn "Run sanityn with Data-on-MDT files" complete $SECONDS check_and_cleanup_lustre -exit_status +exit_status "${TMP}/sanity.log ${TMP}/sanityn.log" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 41ac61e..9354b38 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -6208,9 +6208,14 @@ error_noexit() { exit_status () { local status=0 - local log=$TESTSUITELOG + local logs="$TESTSUITELOG $1" + + for log in $logs; do + if [ -f "$log" ]; then + grep -qw FAIL $log && status=1 + fi + done - [ -f "$log" ] && grep -qw FAIL $log && status=1 exit $status }