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: sta...@vger.kernel.org
Fixes: 90b9566aa5cd ("selftests: forwarding: add a test for 
local_termination.sh")
Signed-off-by: Christian Marangi <ansuels...@gmail.com>
---
 tools/testing/selftests/net/forwarding/local_termination.sh | 2 ++
 1 file changed, 2 insertions(+)

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
-- 
2.45.2


Reply via email to