]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
selftests: mlxsw: Update ping limits
authorPetr Machata <petrm@mellanox.com>
Thu, 31 Jan 2019 22:35:14 +0000 (22:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2019 23:26:36 +0000 (15:26 -0800)
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. This
traffic is seen at the counters, and causes spurious failures.

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>
tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh
tools/testing/selftests/drivers/net/mlxsw/qos_dscp_router.sh

index 111baedc57426ec0df6231e97d8d226e374559ce..40f16f2a3afdd3359ccae8be16f42023cef2aea1 100755 (executable)
@@ -148,9 +148,10 @@ dscp_ping_test()
        eval "t0s=($(dscp_fetch_stats $dev_10 10)
                   $(dscp_fetch_stats $dev_20 20))"
 
+       local ping_timeout=$((PING_TIMEOUT * 5))
        ip vrf exec $vrf_name \
           ${PING} -Q $dscp_10 ${sip:+-I $sip} $dip \
-                  -c 10 -i 0.1 -w $PING_TIMEOUT &> /dev/null
+                  -c 10 -i 0.5 -w $ping_timeout &> /dev/null
 
        local -A t1s
        eval "t1s=($(dscp_fetch_stats $dev_10 10)
index 6fa717ef91ef8266244e62870c196b49777be6f3..9faf02e326270bc00ce20227f9f1b66ca748f8ca 100755 (executable)
@@ -169,9 +169,10 @@ dscp_ping_test()
        eval "local -A dev1_t0s=($(dscp_fetch_stats $dev1 0))"
        eval "local -A dev2_t0s=($(dscp_fetch_stats $dev2 0))"
 
+       local ping_timeout=$((PING_TIMEOUT * 5))
        ip vrf exec $vrf_name \
           ${PING} -Q $dscp ${sip:+-I $sip} $dip \
-                  -c 10 -i 0.1 -w $PING_TIMEOUT &> /dev/null
+                  -c 10 -i 0.5 -w $ping_timeout &> /dev/null
 
        eval "local -A dev1_t1s=($(dscp_fetch_stats $dev1 0))"
        eval "local -A dev2_t1s=($(dscp_fetch_stats $dev2 0))"