linux/tools/testing/selftests/powerpc
Breno Leitao 7c27a26e1e selftests/powerpc: Kill child processes on SIGINT
There are some powerpc selftests, as tm/tm-unavailable, that run for a long
period (>120 seconds), and if it is interrupted, as pressing CRTL-C
(SIGINT), the foreground process (harness) dies but the child process and
threads continue to execute (with PPID = 1 now) in background.

In this case, you'd think the whole test exited, but there are remaining
threads and processes being executed in background. Sometimes these
zombies processes are doing annoying things, as consuming the whole CPU or
dumping things to STDOUT.

This patch fixes this problem by attaching an empty signal handler to
SIGINT in the harness process. This handler will interrupt (EINTR) the
parent process waitpid() call, letting the code to follow through the
normal flow, which will kill all the processes in the child process group.

This patch also fixes a typo.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-08-08 18:52:24 +10:00
..
alignment selftests/powerpc: Add more version checks to alignment_handler test 2018-08-08 00:32:28 +10:00
benchmarks selftests/powerpc: Give some tests longer to run 2018-08-07 21:49:26 +10:00
cache_shape License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
copyloops selftests/powerpc/64: Test exception cases in copy_tofrom_user 2018-08-08 00:32:35 +10:00
dscr selftests/powerpc: Fix typos 2018-07-02 23:59:44 +10:00
include selftests/powerpc: Add a helper for checking if we're on ppc64le 2018-08-07 21:49:25 +10:00
lib selftests/powerpc: Add ptrace tests for VSX, VMX registers 2016-11-17 17:11:51 +11:00
math License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable 2018-03-02 11:37:04 +11:00
pmu selftests/powerpc: Give some tests longer to run 2018-08-07 21:49:26 +10:00
primitives powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
ptrace selftests/powerpc: Fix ptrace-pkey for default execute permission change 2018-07-24 22:03:14 +10:00
scripts selftests/powerpc: Add script to test HMI functionality 2015-12-17 10:46:43 +11:00
signal License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stringloops selftests/powerpc: Update strlen() test to test the new assembly function for PPC32 2018-08-07 21:49:31 +10:00
switch_endian License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscalls License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tm selftests/powerpc: Only run some tests on ppc64le 2018-08-07 21:49:25 +10:00
vphn License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
harness.c selftests/powerpc: Kill child processes on SIGINT 2018-08-08 18:52:24 +10:00
Makefile selftests/powerpc: Remove redundant cp_abort test 2018-05-21 14:48:02 +10:00
utils.c selftests/powerpc: Add a helper for checking if we're on ppc64le 2018-08-07 21:49:25 +10:00