* [LTP] [PATCH v1 1/1] kill11: Skip with pipe-based core dump handlers @ 2026-07-08 13:37 Jan Polensky 2026-07-08 15:26 ` [LTP] " linuxtestproject.agent 0 siblings, 1 reply; 3+ messages in thread From: Jan Polensky @ 2026-07-08 13:37 UTC (permalink / raw) To: ltp; +Cc: Li Wang 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. Signed-off-by: Jan Polensky <japo@linux.ibm.com> --- testcases/kernel/syscalls/kill/kill11.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/testcases/kernel/syscalls/kill/kill11.c b/testcases/kernel/syscalls/kill/kill11.c index 3cf62feaed77..62b515a879a0 100644 --- a/testcases/kernel/syscalls/kill/kill11.c +++ b/testcases/kernel/syscalls/kill/kill11.c @@ -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 = { -- 2.55.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] kill11: Skip with pipe-based core dump handlers 2026-07-08 13:37 [LTP] [PATCH v1 1/1] kill11: Skip with pipe-based core dump handlers Jan Polensky @ 2026-07-08 15:26 ` linuxtestproject.agent 2026-07-09 10:07 ` Jan Polensky 0 siblings, 1 reply; 3+ messages in thread From: linuxtestproject.agent @ 2026-07-08 15:26 UTC (permalink / raw) To: Jan Polensky; +Cc: ltp Hi Jan, On Wed, 08 Jul 2026 15:37:26 +0200, Jan Polensky wrote: > kill11: Skip with pipe-based core dump handlers > + 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 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] kill11: Skip with pipe-based core dump handlers 2026-07-08 15:26 ` [LTP] " linuxtestproject.agent @ 2026-07-09 10:07 ` Jan Polensky 0 siblings, 0 replies; 3+ messages in thread From: Jan Polensky @ 2026-07-09 10:07 UTC (permalink / raw) To: linuxtestproject.agent; +Cc: ltp On Wed, Jul 08, 2026 at 03:26:34PM +0000, linuxtestproject.agent@gmail.com wrote: > Hi Jan, > > On Wed, 08 Jul 2026 15:37:26 +0200, Jan Polensky wrote: > > kill11: Skip with pipe-based core dump handlers > > > + 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 Good point will send v2 soon. Thank you! -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-09 10:07 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-07-08 13:37 [LTP] [PATCH v1 1/1] kill11: Skip with pipe-based core dump handlers Jan Polensky 2026-07-08 15:26 ` [LTP] " linuxtestproject.agent 2026-07-09 10:07 ` Jan Polensky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox