[LTP] [PATCH] Disable io_uring fd in ioctl_pidfd01 for selinux

Petr Vorel pvorel@suse.cz
Tue Jul 29 10:47:20 CEST 2025


> On 7/29/25 10:32 AM, Avinesh Kumar wrote:
> > We also have same failure for memfd_secret case in this test:

> > ioctl_pidfd01.c:37: TINFO: memfd secret -> ...
> > ioctl_pidfd01.c:28: TFAIL: ioctl(memfd secret, PIDFD_GET_INFO, info) expected EINVAL, EBADF, ENOTTY: EACCES (13)

> > If we are opting for skipping the tests when selinux is enforcing mode,
> > this also needs to be skipped.

> In this case we will probably need to disable the test for SELinux
> enforcing.

Well, all tests (ioctl_pidfd01.c, this ioctl_pidfd01.c, mount08.c) are testing
with TST_EXP_FAIL_ARR(), i.e. negative tests.  Wouldn't be better to just expect
a different errno? At least this is what I suggested to mount08.c [1].

Whichever of these to approaches we agree on, I wonder if we should document the
recommended way somewhere, maybe in Writing tests [2].

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/20250728103141.GA756176@pevik/
[2] https://linux-test-project.readthedocs.io/en/latest/developers/writing_tests.html

> - Andrea



More information about the ltp mailing list