[LTP] [PATCH v2 1/1] [STAGING] ioctl_pidfd06: accept EREMOTE/ESRCH for PIDFD_GET_INFO across pidns
Petr Vorel
pvorel@suse.cz
Thu Feb 19 21:06:02 CET 2026
Hi Jan,
> PIDFD_GET_INFO semantics changed for pidfds referring to tasks without a PID
> in the caller's current pid namespace (commit ab89060fbc92e ("pidfs: return
> -EREMOTE when PIDFD_GET_INFO is called on another ns")).
> Accept both errnos to keep the test working on kernels with and without the
> change (including backports).
LGTM, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> Signed-off-by: Jan Polensky <japo@linux.ibm.com>
> ---
> testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
> index 751281bacb74..6b4bc3191e37 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
> @@ -14,6 +14,7 @@
> static struct tst_clone_args *args;
> static struct pidfd_info *info;
> +static const int exp_errnos[] = {EREMOTE, ESRCH};
> static void run(void)
> {
> @@ -41,7 +42,8 @@ static void run(void)
> args->exit_signal = SIGCHLD;
> if (!SAFE_CLONE(args)) {
> - TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), ESRCH);
> + TST_EXP_FAIL_ARR(ioctl(pidfd, PIDFD_GET_INFO, info), exp_errnos,
> + ARRAY_SIZE(exp_errnos));
> exit(0);
> }
More information about the ltp
mailing list