Skip to content

Commit ab0d89d

Browse files
liuhangbinNipaLocal
authored andcommitted
selftests: net: use slowwait to stabilize vrf_route_leaking test
The vrf_route_leaking test occasionally fails due to connectivity issues in our testing environment. A sample failure message shows that the ping check fails intermittently PING 2001:db8:16:2::2 (2001:db8:16:2::2) 56 data bytes --- 2001:db8:16:2::2 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms TEST: Basic IPv6 connectivity [FAIL] This is likely due to insufficient wait time on slower machines. To address this, switch to using slowwait, which provides a longer and more reliable wait for setup completion. Before this change, the test failed 3 out of 10 times. After applying this fix, the test was run 30 times without any failure. Signed-off-by: Hangbin Liu <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent ec11947 commit ab0d89d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/vrf_route_leaking.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ setup_sym()
275275

276276

277277
# Wait for ip config to settle
278-
sleep 2
278+
slowwait 5 ip netns exec $h1 "${ping6}" -c1 -w1 ${H2_N2_IP6} >/dev/null 2>&1
279279
}
280280

281281
setup_asym()
@@ -370,7 +370,7 @@ setup_asym()
370370
ip -netns $r2 -6 addr add dev eth1 ${R2_N2_IP6}/64 nodad
371371

372372
# Wait for ip config to settle
373-
sleep 2
373+
slowwait 5 ip netns exec $h1 "${ping6}" -c1 -w1 ${H2_N2_IP6} >/dev/null 2>&1
374374
}
375375

376376
check_connectivity()

0 commit comments

Comments
 (0)