]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: netfilter: nft_queue.sh: fix spurious timeout on debug kernel
authorFlorian Westphal <fw@strlen.de>
Fri, 30 Aug 2024 09:22:39 +0000 (11:22 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 Sep 2024 11:04:09 +0000 (13:04 +0200)
commit5ceb87dc76ab269c940541ad9487cf0f3c0c793d
tree289965fd1c680cc5064a8f85d179403061bd9077
parent4c93b0bc8645a74fb54f89d80faad55ac2b61f6f
selftests: netfilter: nft_queue.sh: fix spurious timeout on debug kernel

The sctp selftest is very slow on debug kernels.

Its possible that the nf_queue listener program exits due to timeout
before first sctp packet is processed.

In this case socat hangs until script times out.
Fix this by removing the -t option where possible and kill the test
program once the file transfer/socat has exited.

-t sets SO_RCVTIMEO, its inteded for the 'ping' part of the selftest
where we want to make sure that packets get reinjected properly without
skipping a second queue request.

While at it, add a helper to compare the (binary) files instead of diff.
The 'diff' part was copied from a another sub-test that compares text.

Let helper dump file sizes on error so we can see the progress made.

Tested on an old 2010-ish box with a debug kernel and 100 iterations.

This is a followup to the earlier filesize reduction change.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/20240829080109.GB30766@breakpoint.cc/
Fixes: 0a8b08c554da ("selftests: netfilter: nft_queue.sh: reduce test file size for debug build")
Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://patch.msgid.link/20240830092254.8029-1-fw@strlen.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/netfilter/nft_queue.sh