]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(NFS): do not ignore failures in test_nfsv3
authorBenjamin Drung <benjamin.drung@canonical.com>
Wed, 29 Oct 2025 00:58:11 +0000 (01:58 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 29 Oct 2025 02:04:28 +0000 (22:04 -0400)
After `set -e` is called, the shell will exit immediately if a simple
command exits with a non-zero status, but the shell will not exit if the
command is part of a `&&` list.

So calling `test_nfsv3 && test_nfsv4` will not exit on failures in
`test_nfsv3`. Call those functions separately and rely on `set -e`.

test/TEST-60-NFS/test.sh

index 0b6946bd03b9491e4ab1254b4b12e53736ec3f4b..7da3625304467dbd25a8542fc7ae4a32b3324994 100755 (executable)
@@ -211,17 +211,13 @@ test_run() {
         return 1
     fi
 
-    test_nfsv3 \
-        && test_nfsv4
-
-    ret=$?
+    test_nfsv3
+    test_nfsv4
 
     if [[ -s $TESTDIR/server.pid ]]; then
         kill -TERM "$(cat "$TESTDIR"/server.pid)"
         rm -f -- "$TESTDIR"/server.pid
     fi
-
-    return $ret
 }
 
 test_setup() {