From: Frank Lichtenheld Date: Thu, 20 Jun 2024 10:37:48 +0000 (+0200) Subject: t_server_null.sh: Fix failure case X-Git-Tag: v2.7_alpha1~240 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9f29e35cd475f18c34aa96eb5fad452210404f9;p=thirdparty%2Fopenvpn.git t_server_null.sh: Fix failure case 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 Acked-by: Samuli Seppänen 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 --- diff --git a/tests/t_server_null.sh b/tests/t_server_null.sh index cfca5eed1..0e53ba458 100755 --- a/tests/t_server_null.sh +++ b/tests/t_server_null.sh @@ -64,9 +64,12 @@ else fi "${srcdir}/t_server_null_client.sh" +retval=$? # When running make jobs in parallel ("make -j 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 diff --git a/tests/t_server_null_client.sh b/tests/t_server_null_client.sh index 5d5542bf1..88900071b 100755 --- a/tests/t_server_null_client.sh +++ b/tests/t_server_null_client.sh @@ -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