From e2cb43c409b98b97fdb84a678a93651d2176b242 Mon Sep 17 00:00:00 2001 From: James Nunez Date: Fri, 24 Jul 2020 14:13:39 -0600 Subject: [PATCH 1/1] 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 --- lustre/tests/sanity-dom.sh | 2 +- lustre/tests/test-framework.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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 } -- 1.8.3.1