public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Petr Vorel" <pvorel@suse.cz>,
	"Terry Tritton" <terry.tritton@linaro.org>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] ioctl_pidfd02-06: Add CONFIG_USER_NS and CONFIG_PID_NS to needs_kconfigs
Date: Mon, 15 Dec 2025 16:59:43 +0100	[thread overview]
Message-ID: <DEYWYH3VLMDA.R2SSTA8T80LU@suse.com> (raw)
In-Reply-To: <20251215155330.GC272695@pevik>

Hi,

On Mon Dec 15, 2025 at 4:53 PM CET, Petr Vorel wrote:
> Hi all,
>
> > The flags CLONE_NEWUSER and CLONE_NEWPID require specific namespace support.
> > Add CONFIG_USER_NS and CONFIG_PID_NS to needs_kconfigs so these tests return
> > TCONF instead of failing.
>
> > Signed-off-by: Terry Tritton <terry.tritton@linaro.org>
> > ---
> >  testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c | 5 +++++
> >  testcases/kernel/syscalls/ioctl/ioctl_pidfd03.c | 5 +++++
> >  testcases/kernel/syscalls/ioctl/ioctl_pidfd04.c | 5 +++++
> >  testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c | 5 +++++
> >  testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 5 +++++
> >  5 files changed, 25 insertions(+)
>
> > diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c
> > index 7eb60e7fc..6983259e4 100644
> > --- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c
> > +++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c
> > @@ -81,5 +81,10 @@ static struct tst_test test = {
> >  		{&info0, .size = sizeof(*info0)},
> >  		{&info1, .size = sizeof(*info1)},
> >  		{}
> > +	},
> > +	.needs_kconfigs = (const char *[]) {
> > +		"CONFIG_USER_NS",
> > +		"CONFIG_PID_NS",
>
> How about to check /proc/self/ns/user and /proc/self/ns/pid as ioctl_ns06.c
> does?
>
>     int exists = access("/proc/self/ns/user", F_OK);
>
>     if (exists < 0)
>         tst_res(TCONF, "namespace not available");
>
> Long time ago we tried to avoid forcing config. Is it now considered as better?
> (maybe more readable?) Or we would keep checking /proc (or /sys) but add a
> comment for required functions?

This case is specific to the CONFIG_PID_NS/CONFIG_USER_NS configurations
and the feature can't be tested if kernel is not configured with them.
Manual is clear about it: https://www.man7.org/linux/man-pages/man7/pid_namespaces.7.html

>
> Kind regards,
> Petr
>
> > +		NULL




-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-12-15 16:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 21:16 [LTP] [PATCH] ioctl_pidfd02-06: Add CONFIG_USER_NS and CONFIG_PID_NS to needs_kconfigs Terry Tritton
2025-12-12 10:20 ` Andrea Cervesato via ltp
2025-12-15 15:53 ` Petr Vorel
2025-12-15 15:59   ` Andrea Cervesato via ltp [this message]
2025-12-15 16:13     ` Petr Vorel
2025-12-15 16:23       ` Andrea Cervesato via ltp
2025-12-15 16:52         ` Petr Vorel
2025-12-18  8:18           ` Andrea Cervesato via ltp
2026-01-05 13:50             ` Terry Tritton
2026-01-05 14:11               ` Petr Vorel
2026-01-07 16:00               ` Cyril Hrubis
2026-01-07 16:06                 ` Petr Vorel
2026-01-07 16:16                   ` Cyril Hrubis
2026-01-07 16:18                     ` Petr Vorel
2026-01-08  7:26                     ` Jan Stancek via ltp
2026-01-08 13:31                       ` Petr Vorel
2026-01-28  7:24                         ` Petr Vorel
2026-01-29 15:08                           ` Cyril Hrubis
2026-01-29 23:58                             ` Petr Vorel
2026-01-29 15:06                       ` Cyril Hrubis
2026-01-30  0:27                         ` Petr Vorel
2026-01-30  0:41                           ` Li Wang via ltp

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=DEYWYH3VLMDA.R2SSTA8T80LU@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=pvorel@suse.cz \
    --cc=terry.tritton@linaro.org \
    /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