[SRU][N][PATCH 1/1] selftests: net: use slowwait to make sure IPv6 setup finished

AceLan Kao acelan.kao at canonical.com
Tue Sep 22 05:28:57 UTC 2026


From: Hangbin Liu <liuhangbin at gmail.com>

BugLink: https://bugs.launchpad.net/bugs/2071590

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 at gmail.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Link: https://patch.msgid.link/20250617105101.433718-3-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
(cherry picked from commit 948670361c0c189556f3d97c5b2e6ed7ae198da9)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.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 6127a78ee988b..8deacc565afa1 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.53.0




More information about the kernel-team mailing list