linux-stable/tools
Björn Töpel aea3801c23 kselftest/runner.sh: Propagate SIGTERM to runner child
[ Upstream commit 9616cb34b0 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:23:03 +02:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 19:58:33 +02:00
bootconfig bootconfig: Fix testcase to increase max node 2023-03-30 12:47:47 +02:00
bpf bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-19 12:22:32 +02:00
build tools build: Add feature test for init_disassemble_info API changes 2023-03-17 08:49:03 +01:00
cgroup
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:59:12 +02:00
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-09-19 12:22:28 +02:00
iio tools/iio/iio_utils:fix memory leak 2023-03-11 13:57:34 +01:00
include x86/ibt: Add ANNOTATE_NOENDBR 2023-08-26 14:23:39 +02:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:07:51 +02:00
laptop
leds
lib libbpf: fix offsetof() and container_of() to work with CO-RE 2023-07-23 13:46:49 +02:00
memory-model
objtool objtool/x86: Fix SRSO mess 2023-08-30 16:18:10 +02:00
pci
pcmcia
perf perf hists browser: Fix the number of entries for 'e' key 2023-09-19 12:23:02 +02:00
power cpupower: Make TSC read per CPU for Mperf monitor 2023-05-24 17:36:49 +01:00
rcu
scripts
spi
testing kselftest/runner.sh: Propagate SIGTERM to runner child 2023-09-19 12:23:03 +02:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-17 14:24:15 +02:00
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-11-18 19:16:19 +01:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:57:01 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:28:42 +01:00
wmi
Makefile