kill11: Skip with pipe-based core dump handlers
PATCH 1/1 kill11: Skip with pipe-based core dump handlers
kill11 verifies the signal and core dump bit reported to the waiting parent.
When /proc/sys/kernel/core_pattern starts with '|', core dumps are handled by a userspace helper such as systemd-coredump. In such setups the test may hang waiting for children that are blocked in the core dump path instead of testing the wait status itself.
Skip the test with TCONF for pipe-based core dump handlers. Direct filesystem core dumps continue to work as expected.
--- testcases/kernel/syscalls/kill/kill11.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
testcases/kernel/syscalls/kill/kill11.c +18 -0
@@ -105,6 +105,7 @@ static void verify_kill(unsigned int n)static void setup (void ) {struct rlimit rlim; +char core_pattern[256 ];SAFE_GETRLIMIT (RLIMIT_CORE , &rlim);
@@ -121,6 +122,23 @@ static void setup(void) rlim.rlim_cur =MIN_RLIMIT_CORE ;SAFE_SETRLIMIT (RLIMIT_CORE , &rlim); } + +/* +* Check for pipe-based core dumps (e.g., systemd-coredump). +* These can cause indefinite hangs in CI environments due to: +* - I/O contention from parallel test runs +* - Container restrictions on core dump handling +* - cgroup limits on core dump rate/size +* The test requires direct filesystem core dumps to complete reliably. +*/ +SAFE_FILE_SCANF ("/proc/sys/kernel/core_pattern" ,"%255s" , core_pattern); +if (core_pattern[0 ] =='|' ) { +tst_brk (TCONF , +"Pipe-based core dumps detected (e.g., systemd-coredump). " +"Test requires direct filesystem core dumps. " +"Set kernel.core_pattern to a file path (e.g., /tmp/core.%%p) " +"or disable systemd-coredump for proper testing." ); + } }static struct tst_test test = {
Signature · 5 lines
2.55.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jan,
testcases/kernel/syscalls/kill/kill11.c static void setup(void) · line 141
Quoted 10 lines · Jan Polensky
kill11: Skip with pipe-based core dump handlers
testcases/kernel/syscalls/kill/kill11.c +8
-0+SAFE_FILE_SCANF ("/proc/sys/kernel/core_pattern" ,"%255s" , core_pattern); +if (core_pattern[0 ] =='|' ) { +tst_brk (TCONF , +"Pipe-based core dumps detected (e.g., systemd-coredump). " +"Test requires direct filesystem core dumps. " +"Set kernel.core_pattern to a file path (e.g., /tmp/core.%%p) " +"or disable systemd-coredump for proper testing." ); + }
The check is in setup(), which aborts all iterations when it triggers. The hang described in the commit message can only occur when the child receives a signal that actually generates a core dump -- i.e. the cases with dumps_core == 1 (SIGQUIT, SIGILL, SIGABRT, SIGBUS, etc.).
For the 12+ cases with dumps_core == 0 (SIGHUP, SIGKILL, SIGTERM, SIGPIPE, etc.) the child exits immediately without touching the core dump path, so SAFE_WAIT() returns right away and the pipe handler is never involved.
Placing the skip in setup() discards over half the test coverage on any system running systemd-coredump, with no benefit for those cases.
Would it work to keep the core_pattern detection in setup() (store the result in a static bool), then check it per-iteration in verify_kill() only when tc->dumps_core is set?
static bool pipe_based_coredump;
static void setup(void)
{
char core_pattern[256];
...
SAFE_FILE_SCANF("/proc/sys/kernel/core_pattern",
"%255s", core_pattern);
pipe_based_coredump = (core_pattern[0] == '|');
}
static void verify_kill(unsigned int n)
{
struct tcase *tc = &tcases[n]; if (tc->dumps_core && pipe_based_coredump) {
tst_res(TCONF, "%s: pipe-based core dump handler active",
tst_strsig(tc->sig));
return;
}
...}
That way the non-core-dumping signal cases still run.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 61 lines · On Wed, Jul 08, 2026 at 03:26:34PM +0000, [email protected]…
Hi Jan,
testcases/kernel/syscalls/kill/kill11.c static void setup(void) · line 141
Quoted 10 lines · Jan Polensky
kill11: Skip with pipe-based core dump handlers
testcases/kernel/syscalls/kill/kill11.c +8
-0+SAFE_FILE_SCANF ("/proc/sys/kernel/core_pattern" ,"%255s" , core_pattern); +if (core_pattern[0 ] =='|' ) { +tst_brk (TCONF , +"Pipe-based core dumps detected (e.g., systemd-coredump). " +"Test requires direct filesystem core dumps. " +"Set kernel.core_pattern to a file path (e.g., /tmp/core.%%p) " +"or disable systemd-coredump for proper testing." ); + }The check is in
setup(), which aborts all iterations when it triggers. The hang described in the commit message can only occur when the child receives a signal that actually generates a core dump -- i.e. the cases withdumps_core== 1 (SIGQUIT, SIGILL, SIGABRT, SIGBUS, etc.).For the 12+ cases with
dumps_core== 0 (SIGHUP, SIGKILL, SIGTERM, SIGPIPE, etc.) the child exits immediately without touching the core dump path, soSAFE_WAIT()returns right away and the pipe handler is never involved.Placing the skip in
setup()discards over half the test coverage on any system running systemd-coredump, with no benefit for those cases.Would it work to keep the
core_patterndetection insetup()(store the result in a static bool), then check it per-iteration inverify_kill()only whentc->dumps_coreis set?static bool
pipe_based_coredump;static void setup(void) { char core_pattern[256]; ... SAFE_FILE_SCANF("/proc/sys/kernel/core_pattern", "%255s", core_pattern); pipe_based_coredump = (core_pattern[0] == '|'); } static void verify_kill(unsigned int n) { struct tcase *tc = &tcases[n];if (tc->dumps_core && pipe_based_coredump) { tst_res(TCONF, "%s: pipe-based core dump handler active", tst_strsig(tc->sig)); return; } ...}
That way the non-core-dumping signal cases still run.
Verdict - Needs revision
---
Note:
Quoted 6 lines
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Good point will send v2 soon.
Thank you!
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp