]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux: Handle EINVAL as unsupported on tst-pidfd_getinfo
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 20 Nov 2025 19:42:04 +0000 (16:42 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 21 Nov 2025 16:13:26 +0000 (13:13 -0300)
Some kernels returns EINVAL for ioctl (PIDFD_GET_INFO) on pidfd
descriptors.

Checked on aarch64-linux-gnu with Linux 6.12.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
sysdeps/unix/sysv/linux/tst-pidfd_getinfo.c

index 948a7cdb6b36ac03ec635ffd22e5bb606eb09014..f4a77816b43002d7572b100683ad58d75db0bb8a 100644 (file)
@@ -46,7 +46,7 @@ do_test (void)
   };
   if (ioctl (pidfd, PIDFD_GET_INFO, &info) != 0)
     {
-      if (errno == ENOTTY)
+      if (errno == ENOTTY || errno == EINVAL)
        FAIL_UNSUPPORTED ("kernel does not support PIDFD_GET_INFO");
       else
        FAIL_EXIT1 ("ioctl (PIDFD_GET_INFO) failed: %m");