linux-stable/tools/testing
Björn Töpel 9616cb34b0 kselftest/runner.sh: Propagate SIGTERM to runner child
Timeouts in kselftest are done using the "timeout" command with the
"--foreground" option. Without the "foreground" option, it is not
possible for a user to cancel the runner using SIGINT, because the
signal is not propagated to timeout which is running in a different
process group. The "forground" options places the timeout in the same
process group as its parent, but only sends the SIGTERM (on timeout)
signal to the forked process. Unfortunately, this does not play nice
with all kselftests, e.g. "net:fcnal-test.sh", where the child
processes will linger because timeout does not send SIGTERM to the
group.

Some users have noted these hangs [1].

Fix this by nesting the timeout with an additional timeout without the
foreground option.

Link: https://lore.kernel.org/all/7650b2eb-0aee-a2b0-2e64-c9bc63210f67@alu.unizg.hr/ # [1]
Fixes: 651e0d8814 ("kselftest/runner: allow to properly deliver signals to tests")
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-09-08 10:06:11 -06:00
..
crypto/chacha20-s390
cxl Merge branch 'for-6.5/cxl-rch-eh' into for-6.5/cxl 2023-06-25 18:56:13 -07:00
fault-injection
ktest
kunit hardening updates for v6.5-rc1 2023-06-27 21:24:18 -07:00
memblock Add tests for memblock_alloc_node() 2023-05-24 11:56:30 +03:00
nvdimm tools/testing/nvdimm: Drop empty platform remove function 2023-06-07 13:30:21 -07:00
radix-tree maple_tree: fix node allocation testing on 32 bit 2023-07-17 12:53:22 -07:00
scatterlist
selftests kselftest/runner.sh: Propagate SIGTERM to runner child 2023-09-08 10:06:11 -06:00
vsock