From: Yi Zhang Date: Tue, 5 Mar 2019 03:33:19 +0000 (+0800) Subject: Fix the failure case which will exit with 0 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=73c2eb3ac6f1bc904e0128ccec48ecb8fd6d78cf;p=users%2Fsagi%2Fblktests.git Fix the failure case which will exit with 0 The return value of a failing test was masked by the zoned test check. Make sure to return either the original or zoned run failed value. Fixes: e840e1537dc6 ("config: Introduce RUN_ZONED_TESTS variable and CAN_BE_ZONED flag") Signed-off-by: Yi Zhang --- diff --git a/check b/check index 6d44bfb..f0ca382 100755 --- a/check +++ b/check @@ -431,11 +431,14 @@ _run_test() { RESULTS_DIR="$OUTPUT/nodev" _call_test test + local ret=$? if (( RUN_ZONED_TESTS && CAN_BE_ZONED )); then RESULTS_DIR="$OUTPUT/nodev_zoned" RUN_FOR_ZONED=1 _call_test test + ret=$(( ret || $? )) fi + return $ret else if [[ ${#TEST_DEVS[@]} -eq 0 ]] && \ declare -fF fallback_device >/dev/null; then