[LTP] [PATCH v2 1/1] [STAGING] ioctl_pidfd06: accept EREMOTE/ESRCH for PIDFD_GET_INFO across pidns

Jan Polensky japo@linux.ibm.com
Fri Feb 20 16:05:49 CET 2026


On Fri, Feb 20, 2026 at 11:48:53AM +0100, Cyril Hrubis wrote:
> Hi!
> > PIDFD_GET_INFO semantics changed for pidfds referring to tasks without a PID
[snip]
> >
>
> I would be stricter for new kernels, we do not want the new value
> reverted back by an accident. So what about:
>
> static int err_nr = ARRAY_SIZE(exp_errnos);
>
> static void setup(void)
> {
> 	...
> 	if (tst_kvercmp(9, 19, 0) >= 0)
> 		err_nr = 1;
> 	...
> }
>
> >  	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));
> 				^
> 				err_nr
Hi Cyril,

thanks for the suggestion. I agree with you.
I tested the change on v6.18.5 and v6.19.0.

I’ll send v3 with the err_nr update as proposed.

Thanks,
Jan



More information about the ltp mailing list