mirror-linux/tools/testing/selftests/net/lib
Jakub Kicinski 8f0ae19346 selftests: net: exit cleanly on SIGTERM / timeout
ksft runner sends 2 SIGTERMs in a row if a test runs out of time.
Handle this in a similar way we handle SIGINT - cleanup and stop
running further tests.

Because we get 2 signals we need a bit of logic to ignore
the subsequent one, they come immediately one after the other
(due to commit 9616cb34b0 ("kselftest/runner.sh: Propagate SIGTERM
to runner child")).

This change makes sure we run cleanup (scheduled defer()s)
and also print a stack trace on SIGTERM, which doesn't happen
by default. Tests occasionally hang in NIPA and it's impossible
to tell what they are waiting from or doing.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250503011856.46308-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-05-06 11:04:58 +02:00
..
py selftests: net: exit cleanly on SIGTERM / timeout 2025-05-06 11:04:58 +02:00
sh selftests: net: lib: Introduce deferred commands 2024-10-22 13:33:47 +02:00
.gitignore selftests: net: move xdp_helper to net/lib 2025-04-28 15:49:10 -07:00
Makefile selftests: net: move xdp_helper to net/lib 2025-04-28 15:49:10 -07:00
csum.c selftests: net: csum: Clean up recv_verify_packet_ipv6 2024-10-03 16:44:28 -07:00
ksft.h selftests: net: move xdp_helper to net/lib 2025-04-28 15:49:10 -07:00
xdp_dummy.bpf.c selftests: drv-net: add xdp cases for ping.py 2025-03-10 13:31:12 -07:00
xdp_helper.c selftests: net: retry when bind returns EBUSY in xdp_helper 2025-04-28 15:49:10 -07:00