Commit 94867036 authored by Hangbin Liu's avatar Hangbin Liu Committed by Paolo Abeni
Browse files

selftests: net: use slowwait to make sure IPv6 setup finished



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: default avatarHangbin Liu <liuhangbin@gmail.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250617105101.433718-3-liuhangbin@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent d83a5806
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -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)"
}