Fix the failure case which will exit with 0
PATCH 1/1 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 e840e15 ("config: Introduce RUN_ZONED_TESTS variable and
CAN_BE_ZONED flag")
Signed-off-by Yi Zhang <[email protected]>
--- check | 3 +++ 1 file changed, 3 insertions(+)
check +3 -0
@@ -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
Signature · 1 line
2.17.1
Quoted 19 lines · Yi Zhang
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 e840e15 ("config: Introduce RUN_ZONED_TESTS variable and
CAN_BE_ZONEDflag")Signed-off-by Yi Zhang <[email protected]>--- check | 3 +++ 1 file changed, 3 insertions(+)check +1
-0@@ -431,11 +431,14 @@ _run_test() { RESULTS_DIR="$OUTPUT/nodev" _call_test test + local ret=$?
check _run_test() { · line 444
Quoted 10 lines
check +2
-0if (( 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
Hi Yi Zhang, thank you for the fix for commit e840e15. The change is required, and looks good to me.
Reviewed-by Shin'ichiro Kawasaki <[email protected]>
Signature · 2 lines
Best Regards, Shin'ichiro Kawasaki
Quoted 6 lines · Yi Zhang
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 e840e15 ("config: Introduce RUN_ZONED_TESTS variable and
CAN_BE_ZONEDflag")Signed-off-by Yi Zhang <[email protected]>
Thanks for the fix, applied.