Skip to content

Commit

Permalink
selftests: forwarding: Fix ping failure due to short timeout
Browse files Browse the repository at this point in the history
[ Upstream commit e413785 ]

The tests send 100 pings in 0.1 second intervals and force a timeout of
11 seconds, which is borderline (especially on debug kernels), resulting
in random failures in netdev CI [1].

Fix by increasing the timeout to 20 seconds. It should not prolong the
test unless something is wrong, in which case the test will rightfully
fail.

[1]
 # selftests: net/forwarding: vxlan_bridge_1d_port_8472_ipv6.sh
 # INFO: Running tests with UDP port 8472
 # TEST: ping: local->local                                            [ OK ]
 # TEST: ping: local->remote 1                                         [FAIL]
 # Ping failed
 [...]

Fixes: b07e995 ("selftests: forwarding: Add VxLAN tests with a VLAN-unaware bridge for IPv6")
Fixes: 728b352 ("selftests: forwarding: Add VxLAN tests with a VLAN-aware bridge for IPv6")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Closes: https://lore.kernel.org/netdev/24a7051fdcd1f156c3704bca39e4b3c41dfc7c4b.camel@redhat.com/
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240320065717.4145325-1-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
idosch authored and Sasha Levin committed Mar 26, 2024
1 parent 62b1f83 commit b6dfcdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -354,7 +354,7 @@ __ping_ipv4()

# Send 100 packets and verify that at least 100 packets hit the rule,
# to overcome ARP noise.
PING_COUNT=100 PING_TIMEOUT=11 ping_do $dev $dst_ip
PING_COUNT=100 PING_TIMEOUT=20 ping_do $dev $dst_ip
check_err $? "Ping failed"

tc_check_at_least_x_packets "dev $rp1 egress" 101 10 100
Expand Down Expand Up @@ -410,7 +410,7 @@ __ping_ipv6()

# Send 100 packets and verify that at least 100 packets hit the rule,
# to overcome neighbor discovery noise.
PING_COUNT=100 PING_TIMEOUT=11 ping6_do $dev $dst_ip
PING_COUNT=100 PING_TIMEOUT=20 ping6_do $dev $dst_ip
check_err $? "Ping failed"

tc_check_at_least_x_packets "dev $rp1 egress" 101 100
Expand Down
Expand Up @@ -457,7 +457,7 @@ __ping_ipv4()

# Send 100 packets and verify that at least 100 packets hit the rule,
# to overcome ARP noise.
PING_COUNT=100 PING_TIMEOUT=11 ping_do $dev $dst_ip
PING_COUNT=100 PING_TIMEOUT=20 ping_do $dev $dst_ip
check_err $? "Ping failed"

tc_check_at_least_x_packets "dev $rp1 egress" 101 10 100
Expand Down Expand Up @@ -522,7 +522,7 @@ __ping_ipv6()

# Send 100 packets and verify that at least 100 packets hit the rule,
# to overcome neighbor discovery noise.
PING_COUNT=100 PING_TIMEOUT=11 ping6_do $dev $dst_ip
PING_COUNT=100 PING_TIMEOUT=20 ping6_do $dev $dst_ip
check_err $? "Ping failed"

tc_check_at_least_x_packets "dev $rp1 egress" 101 100
Expand Down

0 comments on commit b6dfcdb

Please sign in to comment.