[PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10

Matheus Castanho msc@linux.ibm.com
Thu Jun 2 18:40:29 GMT 2022


Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:

> Instead of fail trying to build the compare source file.
> ---
>  sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
> index 75df0ebed5..90cbb9be64 100644
> --- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
> +++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
> @@ -34,6 +34,9 @@ def main():
>      args = parser.parse_args()
>
>      linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
> +    # Linux started to provide pidfd.h with 5.10.
> +    if linux_version_headers < (5, 10):
> +        sys.exit (77)
>      linux_version_glibc = (5, 18)
>      sys.exit(glibcextract.compare_macro_consts(
>                  '#include <sys/pidfd.h>\n',

Tested on kernels 4.19 and 5.18, results are UNSUPPORTED and PASS,
respectively. As expected.

Tested-by: Matheus Castanho <msc@linux.ibm.com>
Reviewed-by: Matheus Castanho <msc@linux.ibm.com>

Thanks!
Matheus Castanho


More information about the Libc-alpha mailing list