diff options
| author | Alexander Sverdlin <alexander.sverdlin@siemens.com> | 2025-11-06 17:12:09 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-07 06:12:32 +0900 |
| commit | e67848836c37d020c5f926f1ac40290ba4b4b9eb (patch) | |
| tree | 24a53f808c7e4b51732c8a5bdd1f37eecdfeb162 /tools/testing/selftests | |
| parent | 4abca6ba8fd15e3a164cd64142a0fbdce95669fc (diff) | |
| download | linux-e67848836c37d020c5f926f1ac40290ba4b4b9eb.tar.gz linux-e67848836c37d020c5f926f1ac40290ba4b4b9eb.tar.bz2 linux-e67848836c37d020c5f926f1ac40290ba4b4b9eb.zip | |
selftests: net: local_termination: Wait for interfaces to come up
[ Upstream commit 57531b3416448d1ced36a2a974a4085ec43d57b0 ]
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: 90b9566aa5cd3f ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing/selftests')
| -rwxr-xr-x | tools/testing/selftests/net/forwarding/local_termination.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/local_termination.sh b/tools/testing/selftests/net/forwarding/local_termination.sh index 9b5a63519b94..6cde61f10fd0 100755 --- a/tools/testing/selftests/net/forwarding/local_termination.sh +++ b/tools/testing/selftests/net/forwarding/local_termination.sh @@ -108,6 +108,8 @@ run_test() local smac=$(mac_get $h1) local rcv_dmac=$(mac_get $rcv_if_name) + setup_wait + tcpdump_start $rcv_if_name mc_route_prepare $h1 |
