* [PATCH net-next 1/2] selftests: net: use slowwait to stabilize vrf_route_leaking test
2025-06-17 10:50 [PATCH net-next 0/2] selftests: net: use slowwait to make sure setup finished Hangbin Liu
@ 2025-06-17 10:50 ` Hangbin Liu
2025-06-18 10:33 ` Simon Horman
2025-06-17 10:51 ` [PATCH net-next 2/2] selftests: net: use slowwait to make sure IPv6 setup finished Hangbin Liu
2025-06-19 13:30 ` [PATCH net-next 0/2] selftests: net: use slowwait to make sure " patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Hangbin Liu @ 2025-06-17 10:50 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan, linux-kselftest, Hangbin Liu
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 <liuhangbin@gmail.com>
---
tools/testing/selftests/net/vrf_route_leaking.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/vrf_route_leaking.sh b/tools/testing/selftests/net/vrf_route_leaking.sh
index e9c2f71da207..ce34cb2e6e0b 100755
--- a/tools/testing/selftests/net/vrf_route_leaking.sh
+++ b/tools/testing/selftests/net/vrf_route_leaking.sh
@@ -275,7 +275,7 @@ setup_sym()
# Wait for ip config to settle
- sleep 2
+ slowwait 5 ip netns exec $h1 "${ping6}" -c1 -w1 ${H2_N2_IP6} >/dev/null 2>&1
}
setup_asym()
@@ -370,7 +370,7 @@ setup_asym()
ip -netns $r2 -6 addr add dev eth1 ${R2_N2_IP6}/64 nodad
# Wait for ip config to settle
- sleep 2
+ slowwait 5 ip netns exec $h1 "${ping6}" -c1 -w1 ${H2_N2_IP6} >/dev/null 2>&1
}
check_connectivity()
--
2.46.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] selftests: net: use slowwait to stabilize vrf_route_leaking test
2025-06-17 10:50 ` [PATCH net-next 1/2] selftests: net: use slowwait to stabilize vrf_route_leaking test Hangbin Liu
@ 2025-06-18 10:33 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2025-06-18 10:33 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Shuah Khan, linux-kselftest
On Tue, Jun 17, 2025 at 10:50:59AM +0000, Hangbin Liu wrote:
> 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 <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 2/2] selftests: net: use slowwait to make sure IPv6 setup finished
2025-06-17 10:50 [PATCH net-next 0/2] selftests: net: use slowwait to make sure setup finished Hangbin Liu
2025-06-17 10:50 ` [PATCH net-next 1/2] selftests: net: use slowwait to stabilize vrf_route_leaking test Hangbin Liu
@ 2025-06-17 10:51 ` Hangbin Liu
2025-06-18 10:34 ` Simon Horman
2025-06-19 13:30 ` [PATCH net-next 0/2] selftests: net: use slowwait to make sure " patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Hangbin Liu @ 2025-06-17 10:51 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan, linux-kselftest, Hangbin Liu
Sometimes the vxlan vnifiltering test failed on slow machines due to
network setup not finished. e.g.
TEST: VM connectivity over vnifiltering vxlan (ipv4 default rdst) [ OK ]
TEST: VM connectivity over vnifiltering vxlan (ipv6 default rdst) [FAIL]
Let's use slowwait to make sure the connection is finished.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tools/testing/selftests/net/test_vxlan_vnifiltering.sh | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/test_vxlan_vnifiltering.sh b/tools/testing/selftests/net/test_vxlan_vnifiltering.sh
index 6127a78ee988..8deacc565afa 100755
--- a/tools/testing/selftests/net/test_vxlan_vnifiltering.sh
+++ b/tools/testing/selftests/net/test_vxlan_vnifiltering.sh
@@ -146,18 +146,17 @@ run_cmd()
}
check_hv_connectivity() {
- ip netns exec $hv_1 ping -c 1 -W 1 $1 &>/dev/null
- sleep 1
- ip netns exec $hv_1 ping -c 1 -W 1 $2 &>/dev/null
+ slowwait 5 ip netns exec $hv_1 ping -c 1 -W 1 $1 &>/dev/null
+ slowwait 5 ip netns exec $hv_1 ping -c 1 -W 1 $2 &>/dev/null
return $?
}
check_vm_connectivity() {
- run_cmd "ip netns exec $vm_11 ping -c 1 -W 1 10.0.10.12"
+ slowwait 5 run_cmd "ip netns exec $vm_11 ping -c 1 -W 1 10.0.10.12"
log_test $? 0 "VM connectivity over $1 (ipv4 default rdst)"
- run_cmd "ip netns exec $vm_21 ping -c 1 -W 1 10.0.10.22"
+ slowwait 5 run_cmd "ip netns exec $vm_21 ping -c 1 -W 1 10.0.10.22"
log_test $? 0 "VM connectivity over $1 (ipv6 default rdst)"
}
--
2.46.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] selftests: net: use slowwait to make sure IPv6 setup finished
2025-06-17 10:51 ` [PATCH net-next 2/2] selftests: net: use slowwait to make sure IPv6 setup finished Hangbin Liu
@ 2025-06-18 10:34 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2025-06-18 10:34 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Shuah Khan, linux-kselftest
On Tue, Jun 17, 2025 at 10:51:00AM +0000, Hangbin Liu wrote:
> Sometimes the vxlan vnifiltering test failed on slow machines due to
> network setup not finished. e.g.
>
> TEST: VM connectivity over vnifiltering vxlan (ipv4 default rdst) [ OK ]
> TEST: VM connectivity over vnifiltering vxlan (ipv6 default rdst) [FAIL]
>
> Let's use slowwait to make sure the connection is finished.
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/2] selftests: net: use slowwait to make sure setup finished
2025-06-17 10:50 [PATCH net-next 0/2] selftests: net: use slowwait to make sure setup finished Hangbin Liu
2025-06-17 10:50 ` [PATCH net-next 1/2] selftests: net: use slowwait to stabilize vrf_route_leaking test Hangbin Liu
2025-06-17 10:51 ` [PATCH net-next 2/2] selftests: net: use slowwait to make sure IPv6 setup finished Hangbin Liu
@ 2025-06-19 13:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-19 13:30 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, davem, edumazet, kuba, pabeni, horms, shuah,
linux-kselftest
Hello:
This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 17 Jun 2025 10:50:58 +0000 you wrote:
> The two updated tests sometimes failed because the network setup hadn't
> completed. Used slowwait to ensure the setup finished and the tests
> always passed. I ran both tests 50 times, and all of them passed.
>
> Hangbin Liu (2):
> selftests: net: use slowwait to stabilize vrf_route_leaking test
> selftests: net: use slowwait to make sure IPv6 setup finished
>
> [...]
Here is the summary with links:
- [net-next,1/2] selftests: net: use slowwait to stabilize vrf_route_leaking test
https://git.kernel.org/netdev/net-next/c/d83a58067592
- [net-next,2/2] selftests: net: use slowwait to make sure IPv6 setup finished
https://git.kernel.org/netdev/net-next/c/948670361c0c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread