* [PATCH net] selftests: net: amt: wait longer for connection before sending packets
@ 2026-01-18 15:14 Taehee Yoo
2026-01-18 15:38 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Taehee Yoo @ 2026-01-18 15:14 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, horms, shuah, linux-kselftest,
netdev
Cc: ap420073
There is a sleep 2 in send_mcast4() to wait for the connection to be
established between the gateway and the relay.
However, some tests fail because packets are sometimes sent before the
connection is fully established.
So, increase the waiting time to make the tests more reliable.
Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
tools/testing/selftests/net/amt.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/amt.sh b/tools/testing/selftests/net/amt.sh
index 3ef209cacb8e..fe2497d9caff 100755
--- a/tools/testing/selftests/net/amt.sh
+++ b/tools/testing/selftests/net/amt.sh
@@ -246,7 +246,7 @@ test_ipv6_forward()
send_mcast4()
{
- sleep 2
+ sleep 5
ip netns exec "${SOURCE}" bash -c \
'printf "%s %128s" 172.17.0.2 | nc -w 1 -u 239.0.0.1 4000' &
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] selftests: net: amt: wait longer for connection before sending packets
2026-01-18 15:14 [PATCH net] selftests: net: amt: wait longer for connection before sending packets Taehee Yoo
@ 2026-01-18 15:38 ` Eric Dumazet
2026-01-19 13:16 ` Taehee Yoo
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2026-01-18 15:38 UTC (permalink / raw)
To: Taehee Yoo; +Cc: davem, kuba, pabeni, horms, shuah, linux-kselftest, netdev
On Sun, Jan 18, 2026 at 4:15 PM Taehee Yoo <ap420073@gmail.com> wrote:
>
> There is a sleep 2 in send_mcast4() to wait for the connection to be
> established between the gateway and the relay.
>
> However, some tests fail because packets are sometimes sent before the
> connection is fully established.
>
> So, increase the waiting time to make the tests more reliable.
>
> Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> ---
> tools/testing/selftests/net/amt.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/amt.sh b/tools/testing/selftests/net/amt.sh
> index 3ef209cacb8e..fe2497d9caff 100755
> --- a/tools/testing/selftests/net/amt.sh
> +++ b/tools/testing/selftests/net/amt.sh
> @@ -246,7 +246,7 @@ test_ipv6_forward()
>
> send_mcast4()
> {
> - sleep 2
> + sleep 5
1) Have you considered using wait_local_port_listen instead ?
2) What about send_mcast6() ?
> ip netns exec "${SOURCE}" bash -c \
> 'printf "%s %128s" 172.17.0.2 | nc -w 1 -u 239.0.0.1 4000' &
> }
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] selftests: net: amt: wait longer for connection before sending packets
2026-01-18 15:38 ` Eric Dumazet
@ 2026-01-19 13:16 ` Taehee Yoo
0 siblings, 0 replies; 3+ messages in thread
From: Taehee Yoo @ 2026-01-19 13:16 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, pabeni, horms, shuah, linux-kselftest, netdev
On Mon, Jan 19, 2026 at 12:38 AM Eric Dumazet <edumazet@google.com> wrote:
>
Hi Eric,
Thanks a lot for the review!
> On Sun, Jan 18, 2026 at 4:15 PM Taehee Yoo <ap420073@gmail.com> wrote:
> >
> > There is a sleep 2 in send_mcast4() to wait for the connection to be
> > established between the gateway and the relay.
> >
> > However, some tests fail because packets are sometimes sent before the
> > connection is fully established.
> >
> > So, increase the waiting time to make the tests more reliable.
> >
> > Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
> > Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> > ---
> > tools/testing/selftests/net/amt.sh | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/net/amt.sh b/tools/testing/selftests/net/amt.sh
> > index 3ef209cacb8e..fe2497d9caff 100755
> > --- a/tools/testing/selftests/net/amt.sh
> > +++ b/tools/testing/selftests/net/amt.sh
> > @@ -246,7 +246,7 @@ test_ipv6_forward()
> >
> > send_mcast4()
> > {
> > - sleep 2
> > + sleep 5
>
> 1) Have you considered using wait_local_port_listen instead ?
>
> 2) What about send_mcast6() ?
>
Thanks, I've testing using use wait_local_port_listen instead of sleep,
it's working very well.
So, I will add the wait_local_port_listen() to send_mcast4() and replace
sleep with wait_local_port_listen in the send_mcast6() in the v2.
The sleep in send_mcast4() is still needed because of waiting for
establishment of amt tunnel.
Thanks a lot!
Taehee Yoo
> > ip netns exec "${SOURCE}" bash -c \
> > 'printf "%s %128s" 172.17.0.2 | nc -w 1 -u 239.0.0.1 4000' &
> > }
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-19 13:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-18 15:14 [PATCH net] selftests: net: amt: wait longer for connection before sending packets Taehee Yoo
2026-01-18 15:38 ` Eric Dumazet
2026-01-19 13:16 ` Taehee Yoo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox