[LTP] [PATCH v1 1/1] kill11: Skip with pipe-based core dump handlers

Jan Polensky japo@linux.ibm.com
Wed Jul 8 15:37:26 CEST 2026


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



More information about the ltp mailing list