t_client: add per-instance arguments to fping
PATCH 1/1 t_client: add per-instance arguments to fping
In addition to global FPING_EXTRA_ARGS now also evaluate FPING_ARGGS_<suffix>.
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 <[email protected]...>
--- tests/t_client.sh.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/t_client.sh.in +3 -2
@@ -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.
Signature · 1 line
2.37.2
Quoted 6 lines · Gert Doering
In addition to global
FPING_EXTRA_ARGSnow also evaluate FPING_ARGGS_<suffix>.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".
Trivial change. Tested and looks good.
Regards,
Signature · 1 line
Frank Lichtenheld
Thanks for the review.
Patch has been applied to the master branch.
commit 27229d174d4dec2cbfcf05865d49ef48442c2ff3
Author: Gert Doering Date: Mon Sep 26 10:11:58 2022 +0200
t_client: add per-instance arguments to fping
Signed-off-by: Gert Doering <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg25315.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering