linux: Set tst-pidfd-consts unsupported for kernels headers older than 5.10
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 2 Jun 2022 11:50:58 +0000 (08:50 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 2 Jun 2022 18:43:25 +0000 (15:43 -0300)
Instead of fail trying to build the compare source file.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Matheus Castanho <msc@linux.ibm.com>
Reviewed-by: Matheus Castanho <msc@linux.ibm.com>
sysdeps/unix/sysv/linux/tst-pidfd-consts.py

index 75df0ebed53546889f3f46a70fa2f8819a3c16a1..90cbb9be642f11d028fcef38c9673a3a57a8167e 100644 (file)
@@ -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',