summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/forwarding/mirror_lib.sh
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2019-01-31 22:35:10 +0000
committerDavid S. Miller <davem@davemloft.net>2019-02-01 15:26:36 -0800
commitb6a4fd680042acfbb557f0608f34a9061e07465c (patch)
tree0ca22fe0f64a6c73e82aedf9c72d19b00ace48fe /tools/testing/selftests/net/forwarding/mirror_lib.sh
parent3fc46fc9f68c71e21afde62984444b2ffdd1ea90 (diff)
selftests: forwarding: Make ping timeout configurable
The current timeout (2 seconds) proved to be too low for some (emulated) systems where we run the tests. Make the timeout configurable and default to 5 seconds. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/forwarding/mirror_lib.sh')
-rw-r--r--tools/testing/selftests/net/forwarding/mirror_lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh
index 07991e1025c7..a1c0389eb049 100644
--- a/tools/testing/selftests/net/forwarding/mirror_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh
@@ -31,7 +31,8 @@ mirror_test()
local t0=$(tc_rule_stats_get $dev $pref)
ip vrf exec $vrf_name \
- ${PING} ${sip:+-I $sip} $dip -c 10 -i 0.1 -w 2 &> /dev/null
+ ${PING} ${sip:+-I $sip} $dip -c 10 -i 0.1 -w $PING_TIMEOUT \
+ &> /dev/null
local t1=$(tc_rule_stats_get $dev $pref)
local delta=$((t1 - t0))
# Tolerate a couple stray extra packets.