[PATCH blktests 1/4] check: fix exit status code handling
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Sun Jul 12 17:39:03 PDT 2026
Commit e50a5ff644f3 ("check: call _unload_module() after
fallback_device_cleanup()") added a _unload_module() call to
_check_and_call(). However, after this commit, _check_and_call() no
longer returns the exit status of _call_test(). Then, the check script
does not return non-zero exit status even when any test case fails. Fix
this by adding a local variable to keep the exit status of _call_test().
Fixes: e50a5ff644f3 ("check: call _unload_module() after fallback_device_cleanup()")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
---
check | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/check b/check
index bc2dde9..61524a5 100755
--- a/check
+++ b/check
@@ -701,7 +701,7 @@ _unload_modules() {
}
_check_and_call_test() {
- local postfix
+ local postfix ret
if declare -fF requires >/dev/null; then
requires
@@ -710,7 +710,9 @@ _check_and_call_test() {
[[ -n $COND_DESC ]] && postfix=_${COND_DESC//[ =]/_}
RESULTS_DIR="$OUTPUT/nodev${postfix}"
_call_test test
+ ret=$?
_unload_modules
+ return $ret
}
_check_and_call_test_device() {
--
2.55.0
More information about the Linux-nvme
mailing list