Subject: Re: [PATCH net] selftests: net: avoid waiting for server in amt.sh forever when it fails.

From: Jakub Kicinski <[email-masked]>
Date: Thu, 9 May 2024 09:22:57 -0700

On Wed,  8 May 2024 04:06:43 +0000 Taehee Yoo wrote:
> In the forwarding testcase, it opens a server and a client with the nc.
> The server receives the correct message from NC, it prints OK.
> The server prints FAIL if it receives the wrong message from the client.
> 
> But If the server can't receive any message, it will not close so
> the amt.sh waits forever.
> There are several reasons.
> 1. crash of smcrouted.
> 2. Send a message from the client to the server before the server is up.
> 
> To avoid this problem, the server waits only for 10 seconds.
> The client sends messages for 10 seconds.
> If the server is successfully closed, it kills the client.

Since this didn't fix the problem of smcroute crashing I had to take 
a closer look myself.

I filed https://github.com/troglobit/smcroute/issues/207 for smcroute

And sent:
https://lore.kernel.org/all/[email-masked]/
and
https://lore.kernel.org/all/[email-masked]/

Please don't use netcat in tests in the future. There are two
incompatible implementations which always cause hard to repro
issues.