summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2019-01-31 22:35:12 +0000
committerDavid S. Miller <davem@davemloft.net>2019-02-01 15:26:36 -0800
commit0175cb59220b73a234f95597857eb04841d1758c (patch)
tree269e6861693ecea26f93ffa70112bf393131f1d6 /tools
parentb6a4fd680042acfbb557f0608f34a9061e07465c (diff)
downloadlinux-0175cb59220b73a234f95597857eb04841d1758c.tar.gz
linux-0175cb59220b73a234f95597857eb04841d1758c.tar.bz2
linux-0175cb59220b73a234f95597857eb04841d1758c.zip
selftests: forwarding: mirror_lib: Update ping limits
The current ping intervals are too short for running mirroring tests in simulator. This leads to ping sending a follow-up ping before the reply arrives, thus sending more than the requested 10 ICMP requests. Those are mirrored, and over a certain threshold the test case run is considered a failure, because too much traffic is observed. Bump interval and timeout numbers 5x in mirroring tests to address the spurious failures. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/net/forwarding/mirror_lib.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh
index a1c0389eb049..878f8d53327a 100644
--- a/tools/testing/selftests/net/forwarding/mirror_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh
@@ -29,10 +29,11 @@ mirror_test()
local pref=$1; shift
local expect=$1; shift
+ local ping_timeout=$((PING_TIMEOUT * 5))
local t0=$(tc_rule_stats_get $dev $pref)
ip vrf exec $vrf_name \
- ${PING} ${sip:+-I $sip} $dip -c 10 -i 0.1 -w $PING_TIMEOUT \
- &> /dev/null
+ ${PING} ${sip:+-I $sip} $dip -c 10 -i 0.5 -w $ping_timeout \
+ &> /dev/null
local t1=$(tc_rule_stats_get $dev $pref)
local delta=$((t1 - t0))
# Tolerate a couple stray extra packets.