diff mbox series

[net,2/2] selftests: forwarding: local_termination: sleep before starting tests

Message ID 20241130113314.6488-2-ansuelsmth@gmail.com (mailing list archive)
State New
Headers show
Series [net,1/2] selftests: net: lib: fix broken ping with coreutils ping util | expand

Commit Message

Christian Marangi Nov. 30, 2024, 11:33 a.m. UTC
It seems real hardware requires some time to stabilize and actually
works after an 'ip link up'. This is not the case for veth as everything
is simulated but this is a requirement for real hardware to permit
receiving packet.

Without this the very fist test for unicast always fails on real
hardware. With the introduced sleep of one second after mc_route_prepare,
the test corretly pass as the packet can correctly be delivered.

Cc: stable@vger.kernel.org
Fixes: 90b9566aa5cd ("selftests: forwarding: add a test for local_termination.sh")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 tools/testing/selftests/net/forwarding/local_termination.sh | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/forwarding/local_termination.sh b/tools/testing/selftests/net/forwarding/local_termination.sh
index c35548767756..8923c741ce4b 100755
--- a/tools/testing/selftests/net/forwarding/local_termination.sh
+++ b/tools/testing/selftests/net/forwarding/local_termination.sh
@@ -182,6 +182,8 @@  run_test()
 	mc_route_prepare $send_if_name
 	mc_route_prepare $rcv_if_name
 
+	sleep 1
+
 	send_uc_ipv4 $send_if_name $rcv_dmac
 	send_uc_ipv4 $send_if_name $MACVLAN_ADDR
 	send_uc_ipv4 $send_if_name $UNKNOWN_UC_ADDR1