On 11/04/24 08:12PM, Shin'ichiro Kawasaki wrote:
The function _run_test() is rather complex and has deep nests. Before modifying it for repeated test case runs, simplify it. Factor out some part of the function to the new functions _check_and_call_test() and _check_and_call_test_device(). Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> --- check | 90 +++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/check b/check index 55871b0..b1f5212 100755 --- a/check +++ b/check @@ -463,6 +463,56 @@ _unload_modules() { unset MODULES_TO_UNLOAD } +_check_and_call_test() {
ret should be declared ret as local ?
+ if declare -fF requires >/dev/null; then + requires + fi + + RESULTS_DIR="$OUTPUT/nodev" + _call_test test + 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 +} + +_check_and_call_test_device() { + local unset_skip_reason
Same here, ret should declared be local ? Reviewed-by: Nitesh Shetty <nj.shetty@xxxxxxxxxxx>