From: Petr Vorel <pvorel@suse.cz>
To: Avinesh Kumar <avinesh.kumar@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] coredump01: Skip pipe core_pattern under SELinux enforcing
Date: Mon, 21 Sep 2026 10:54:03 +0200 [thread overview]
Message-ID: <20260921085403.GA2052539@pevik> (raw)
In-Reply-To: <20260918194316.109853-1-avinesh.kumar@suse.com>
Hi Avinesh,
thanks for the fix, merged.
@Jan @Li @Michael FYI
Kind regards,
Petr
> SELinux in enforcing mode silently blocks the kernel's usermode-helper
> spawn for the piped core_pattern, so the helper never runs and the
> test reports FAIL.
> coredump01.c:126: TINFO: Testing pipe core_pattern
> coredump01.c:100: TFAIL: coredump01_helper did not report any core dump
> Skip with TCONF instead of failing.
> Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
> ---
> testcases/kernel/coredump/coredump01.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> diff --git a/testcases/kernel/coredump/coredump01.c b/testcases/kernel/coredump/coredump01.c
> index c4fb92e4dcb0..15aaf8c56143 100644
> --- a/testcases/kernel/coredump/coredump01.c
> +++ b/testcases/kernel/coredump/coredump01.c
> @@ -31,12 +31,14 @@
> #include "coredump_common.h"
> #include "tst_kconfig.h"
> +#include "tst_security.h"
> #define HELPER "coredump01_helper"
> #define HELPER_TIMEOUT 10
> static char helper_path[PATH_MAX];
> static int static_usermodehelper;
> +static int selinux_enforcing;
> /*
> * e_ident[] and e_type live at the same file offset in ELF32 and ELF64,
> @@ -89,6 +91,11 @@ static void verify_pipe_pattern(void)
> return;
> }
> + if (selinux_enforcing) {
> + tst_res(TCONF, "SELinux is enforcing, skipping pipe core_pattern");
> + return;
> + }
> +
> set_pattern("|%s %%e %%p %%s %s/res.%%p", helper_path, cwd);
> pid = crash_child();
> @@ -137,6 +144,8 @@ static void setup(void)
> tst_kconfig_read(&kconfig, 1);
> static_usermodehelper = (kconfig.choice == 'y');
> + selinux_enforcing = tst_selinux_enforcing();
> +
> if (tst_get_path(HELPER, path, sizeof(path)))
> tst_brk(TCONF, "'%s' not found in $PATH", HELPER);
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-09-21 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 19:43 [LTP] [PATCH] coredump01: Skip pipe core_pattern under SELinux enforcing Avinesh Kumar via ltp
2026-09-18 22:25 ` [LTP] " linuxtestproject.agent
2026-09-21 8:54 ` Petr Vorel [this message]
2026-09-22 9:25 ` [LTP] [PATCH] " Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921085403.GA2052539@pevik \
--to=pvorel@suse.cz \
--cc=avinesh.kumar@suse.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox