[PATCH] Linux: Ignore PIDFD_GET_INFO in tst-pidfd-consts

Carlos O'Donell carlos@redhat.com
Thu Nov 27 13:33:10 GMT 2025


On 11/27/25 8:20 AM, Florian Weimer wrote:
> The constant is expected to change between kernel releases.

Correct.

Defined as "_IOWR(PIDFS_IOCTL_MAGIC, 11, struct pidfd_info)" which
eventually uses sizeof(type) encoded into the constant as the type
check, and the type can change in size.

Removing it from the check here avoids spurious failures when the
structure increases in size.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>   sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
> index 6dc678380c..b7b98a0ab0 100644
> --- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
> +++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
> @@ -46,7 +46,13 @@ def main():
>                   '#include <linux/pidfd.h>\n',
>                   args.cc,
>                   'PIDFD_.*',
> -                None,
> +                # Until at least Linux 6.17, the value of this
> +                # constant depends on the size of struct pidfd_info,
> +                # which is expected to get extended in future kernel
> +                # versions.  As a result, the constant embedded in the
> +                # glibc headers is expected not to match the UAPI
> +                # constant.
> +                '^PIDFD_GET_INFO$',
>                   linux_version_glibc > linux_version_headers,
>                   linux_version_headers > linux_version_glibc))
>   
> 
> base-commit: a61f7fd59d386331888422b3132599f341f1da78
> 


-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list