[LTP] [PATCH v3] Introduce ioctl_pidfd_get_info_supported() function

Cyril Hrubis chrubis@suse.cz
Wed Sep 24 10:40:01 CEST 2025


Hi!
> > use this routine in ioctl_pidfd05 before proceeding with the test
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> BTW, when testing on 6.11, I got:
> ioctl_pidfd05.c:45: TFAIL: ioctl(pidfd, PIDFD_GET_INFO, NULL) expected EINVAL: ENOTTY (25)

This is exactly what this patch is trying to address. Not sure what went
wrong there.

> Which is error unrelated to this patch, it's from original.
> 196988f7d1 ("Add ioctl_pidfd05 test")
> 
> Doc in ioctl_pidfd_info_exit_supported() is clear about it:
> 		/* - ENOTTY: old kernels not implementing fs/pidfs.c:pidfd_ioctl
> 		 * - EINVAL: until v6.13 kernel
> 		 * - ESRCH: all kernels between v6.13 and v6.15
> 		 */

And the pidfd_info_supported() tries to address that by returning zero
on ENOTTY.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list