Skip to content

Commit a5cb78c

Browse files
liuhangbinNipaLocal
authored andcommitted
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: Hangbin Liu <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent ab0d89d commit a5cb78c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/testing/selftests/net/test_vxlan_vnifiltering.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,17 @@ run_cmd()
146146
}
147147

148148
check_hv_connectivity() {
149-
ip netns exec $hv_1 ping -c 1 -W 1 $1 &>/dev/null
150-
sleep 1
151-
ip netns exec $hv_1 ping -c 1 -W 1 $2 &>/dev/null
149+
slowwait 5 ip netns exec $hv_1 ping -c 1 -W 1 $1 &>/dev/null
150+
slowwait 5 ip netns exec $hv_1 ping -c 1 -W 1 $2 &>/dev/null
152151

153152
return $?
154153
}
155154

156155
check_vm_connectivity() {
157-
run_cmd "ip netns exec $vm_11 ping -c 1 -W 1 10.0.10.12"
156+
slowwait 5 run_cmd "ip netns exec $vm_11 ping -c 1 -W 1 10.0.10.12"
158157
log_test $? 0 "VM connectivity over $1 (ipv4 default rdst)"
159158

160-
run_cmd "ip netns exec $vm_21 ping -c 1 -W 1 10.0.10.22"
159+
slowwait 5 run_cmd "ip netns exec $vm_21 ping -c 1 -W 1 10.0.10.22"
161160
log_test $? 0 "VM connectivity over $1 (ipv6 default rdst)"
162161
}
163162

0 commit comments

Comments
 (0)