public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10
@ 2022-06-02 11:52 Adhemerval Zanella
  2022-06-02 13:53 ` Carlos O'Donell
  2022-06-02 18:40 ` Matheus Castanho
  0 siblings, 2 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2022-06-02 11:52 UTC (permalink / raw)
  To: libc-alpha, Joseph Myers, Matheus Castanho

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',
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10
  2022-06-02 11:52 [PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10 Adhemerval Zanella
@ 2022-06-02 13:53 ` Carlos O'Donell
  2022-06-02 18:40 ` Matheus Castanho
  1 sibling, 0 replies; 3+ messages in thread
From: Carlos O'Donell @ 2022-06-02 13:53 UTC (permalink / raw)
  To: Adhemerval Zanella, libc-alpha, Joseph Myers, Matheus Castanho

On 6/2/22 07:52, Adhemerval Zanella via Libc-alpha wrote:
> Instead of fail trying to build the compare source file.

The header appears in 5.9-rc2, but is missing from the final 5.9
release, and is only in the final 5.10. Confirmed.

LGTM.

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

> ---
>  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',


-- 
Cheers,
Carlos.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10
  2022-06-02 11:52 [PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10 Adhemerval Zanella
  2022-06-02 13:53 ` Carlos O'Donell
@ 2022-06-02 18:40 ` Matheus Castanho
  1 sibling, 0 replies; 3+ messages in thread
From: Matheus Castanho @ 2022-06-02 18:40 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha, Joseph Myers


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-02 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 11:52 [PATCH] linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10 Adhemerval Zanella
2022-06-02 13:53 ` Carlos O'Donell
2022-06-02 18:40 ` Matheus Castanho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).