mirror-linux/tools/testing/selftests/net/lib/py
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
..
__init__.py selftests: net: Add python context manager for netns entering 2025-02-21 15:28:03 -08:00
consts.py
ksft.py selftests: net: exit cleanly on SIGTERM / timeout 2025-05-06 11:04:58 +02:00
netns.py selftests: net: Add python context manager for netns entering 2025-02-21 15:28:03 -08:00
nsim.py selftests: drivers: net: fix name not defined 2024-10-11 16:01:00 -07:00
utils.py selftests: drv-net-hw: Add a test for symmetric RSS hash 2025-02-25 18:31:05 -08:00
ynl.py netlink: specs: rename rtnetlink specs in accordance with family name 2025-04-10 20:14:40 -07:00