* [PATCH net v2] selftests: net: amt: wait longer for connection before sending packets
@ 2026-01-20 13:39 Taehee Yoo
2026-01-22 3:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2026-01-20 13:39 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, horms, shuah, linux-kselftest,
netdev
Cc: ap420073
Both send_mcast4() and send_mcast6() use sleep 2 to wait for the tunnel
connection between the gateway and the relay, and for the listener
socket to be created in the LISTENER namespace.
However, tests sometimes fail because packets are sent before the
connection is fully established.
Increase the waiting time to make the tests more reliable, and use
wait_local_port_listen() to explicitly wait for the listener socket.
Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
v2:
- Add wait_local_port_listen() to both send_mcast4() and send_mcast6()
tools/testing/selftests/net/amt.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/amt.sh b/tools/testing/selftests/net/amt.sh
index 3ef209cacb8e..663744305e52 100755
--- a/tools/testing/selftests/net/amt.sh
+++ b/tools/testing/selftests/net/amt.sh
@@ -73,6 +73,8 @@
# +------------------------+
#==============================================================================
+source lib.sh
+
readonly LISTENER=$(mktemp -u listener-XXXXXXXX)
readonly GATEWAY=$(mktemp -u gateway-XXXXXXXX)
readonly RELAY=$(mktemp -u relay-XXXXXXXX)
@@ -246,14 +248,15 @@ test_ipv6_forward()
send_mcast4()
{
- sleep 2
+ sleep 5
+ wait_local_port_listen ${LISTENER} 4000 udp
ip netns exec "${SOURCE}" bash -c \
'printf "%s %128s" 172.17.0.2 | nc -w 1 -u 239.0.0.1 4000' &
}
send_mcast6()
{
- sleep 2
+ wait_local_port_listen ${LISTENER} 6000 udp
ip netns exec "${SOURCE}" bash -c \
'printf "%s %128s" 2001:db8:3::2 | nc -w 1 -u ff0e::5:6 6000' &
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net v2] selftests: net: amt: wait longer for connection before sending packets
2026-01-20 13:39 [PATCH net v2] selftests: net: amt: wait longer for connection before sending packets Taehee Yoo
@ 2026-01-22 3:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-22 3:30 UTC (permalink / raw)
To: Taehee Yoo
Cc: davem, kuba, pabeni, edumazet, horms, shuah, linux-kselftest,
netdev
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 20 Jan 2026 13:39:30 +0000 you wrote:
> Both send_mcast4() and send_mcast6() use sleep 2 to wait for the tunnel
> connection between the gateway and the relay, and for the listener
> socket to be created in the LISTENER namespace.
>
> However, tests sometimes fail because packets are sent before the
> connection is fully established.
>
> [...]
Here is the summary with links:
- [net,v2] selftests: net: amt: wait longer for connection before sending packets
https://git.kernel.org/netdev/net/c/04708606fd7b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-22 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-20 13:39 [PATCH net v2] selftests: net: amt: wait longer for connection before sending packets Taehee Yoo
2026-01-22 3:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox