Skip to content

Commit 57531b3

Browse files
ccpalexkuba-moo
authored andcommitted
selftests: net: local_termination: Wait for interfaces to come up
It seems that most of the tests prepare the interfaces once before the test run (setup_prepare()), rely on setup_wait() to wait for link and only then run the test(s). local_termination brings the physical interfaces down and up during test run but never wait for them to come up. If the auto-negotiation takes some seconds, first test packets are being lost, which leads to false-negative test results. Use setup_wait() in run_test() to make sure auto-negotiation has been completed after all simple_if_init() calls on physical interfaces and test packets will not be lost because of the race against link establishment. Fixes: 90b9566 ("selftests: forwarding: add a test for local_termination.sh") Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://patch.msgid.link/20251106161213.459501-1-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 4da4e4b commit 57531b3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/testing/selftests/net/forwarding/local_termination.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ run_test()
176176
local rcv_dmac=$(mac_get $rcv_if_name)
177177
local should_receive
178178

179+
setup_wait
180+
179181
tcpdump_start $rcv_if_name
180182

181183
mc_route_prepare $send_if_name

0 commit comments

Comments
 (0)