]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
t_server_null.sh: Fix failure case
authorFrank Lichtenheld <frank@lichtenheld.com>
Thu, 20 Jun 2024 10:37:48 +0000 (12:37 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 20 Jun 2024 13:33:28 +0000 (15:33 +0200)
The changes for POSIX shell compatibility and parallel
make compatibility broke actually failing the test
when a subtest fails.

Change-Id: I35f7cf84e035bc793d6f0f59e46edf1a2efe0391
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Message-Id: <20240620103749.7923-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28815.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
tests/t_server_null.sh
tests/t_server_null_client.sh

index cfca5eed120cfd064719bb0b129beecc997ee1c1..0e53ba458f82eebd0064eb73411fc7fb02be122e 100755 (executable)
@@ -64,9 +64,12 @@ else
 fi
 
 "${srcdir}/t_server_null_client.sh"
+retval=$?
 
 # When running make jobs in parallel ("make -j<x> check") we need to ensure
 # that this script does not exit before all --dev null servers are dead and
 # their network interfaces are gone. Otherwise t_client.sh will fail because
 # pre and post ifconfig output does not match.
 wait
+
+exit $retval
index 5d5542bf1c055d93e3bcfdaba208c62692dd9f6f..88900071bd4a3dfadbd0c2f8e644c343d25d22c6 100755 (executable)
@@ -130,7 +130,7 @@ do
     eval test_name=\"\$TEST_NAME_$SUF\"
     eval should_pass=\"\$SHOULD_PASS_$SUF\"
 
-    (get_client_test_result "${test_name}" "${should_pass}")
+    get_client_test_result "${test_name}" "${should_pass}"
 done
 
 exit $retval