From 27229d174d4dec2cbfcf05865d49ef48442c2ff3 Mon Sep 17 00:00:00 2001 From: Gert Doering Date: Mon, 26 Sep 2022 10:11:58 +0200 Subject: [PATCH] t_client: add per-instance arguments to fping In addition to global FPING_EXTRA_ARGS now also evaluate FPING_ARGGS_. This can be used, for example, for a test instance for "will ToS-tagged packets be sent properly?" by setting FPING_ARGS_2="-O 0x10". Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld Message-Id: <20220926081158.40640-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25315.html Signed-off-by: Gert Doering --- tests/t_client.sh.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index 76ac9b227..48ba6e68f 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -238,8 +238,8 @@ run_ping_tests() do echo "run IPv$proto ping tests ($want), $bytes byte packets..." - echo "$cmd -b $bytes -C 20 -p 250 -q $FPING_EXTRA_ARGS $targetlist" >>$LOGDIR/$SUF:fping.out - $cmd -b $bytes -C 20 -p 250 -q $FPING_EXTRA_ARGS $targetlist >>$LOGDIR/$SUF:fping.out 2>&1 + echo "$cmd -b $bytes -C 20 -p 250 -q $fping_args $targetlist" >>$LOGDIR/$SUF:fping.out + $cmd -b $bytes -C 20 -p 250 -q $fping_args $targetlist >>$LOGDIR/$SUF:fping.out 2>&1 # while OpenVPN is running, pings must succeed (want='want_ok') # before OpenVPN is up, pings must NOT succeed (want='want_fail') @@ -278,6 +278,7 @@ do eval expect_ifconfig6=\"\$EXPECT_IFCONFIG6_$SUF\" eval ping4_hosts=\"\$PING4_HOSTS_$SUF\" eval ping6_hosts=\"\$PING6_HOSTS_$SUF\" + eval fping_args=\"\$FPING_EXTRA_ARGS \$FPING_ARGS_$SUF\" # If EXCEPT_IFCONFIG* variables for this test are missing, run an --up # script to generate them dynamically. -- 2.47.2