selftests: net: move amt to socat for better compatibility
authorJakub Kicinski <kuba@kernel.org>
Thu, 9 May 2024 16:19:52 +0000 (09:19 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 May 2024 01:18:20 +0000 (18:18 -0700)
commit4c639b6a7b9db236c0907aca8e92d1537076f2cd
tree5437b2c97f5e4cd6992731b382fd1ebff89db5dd
parentc499fe96d3f75a5cf50de6089dd8f1cddd1301a9
selftests: net: move amt to socat for better compatibility

The test seems to expect that nc will exit after the first
received message. This is not the case with Ncat 7.94.
There are multiple versions of nc out there, switch
to socat for better compatibility.

Tell socat to exit after 128 bytes and pad the message.

Since the test sets -e make sure we don't set exit code
(|| true) and print the pass / fail rather then silently
moving over the test and just setting non-zero exit code
with no output indicating what failed.

Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
Acked-by: Paolo Abeni<pabeni@redhat.com>
Tested-by: Taehee Yoo <ap420073@gmail.com>
Link: https://lore.kernel.org/r/20240509161952.3940476-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/amt.sh