[LTP] [PATCH v3 8/8] Add ioctl_pidfd06 test

Andrea Cervesato andrea.cervesato@suse.com
Wed Jul 23 15:59:26 CEST 2025


On 7/23/25 3:08 PM, Cyril Hrubis wrote:
> SAFE_CLOSE(pid_child) here?
>
> Otherwise we end up out of file descriptors with large enough -i
> parameter.
>
> Otherwise:
>
> Reviewed-by: Cyril Hrubis<chrubis@suse.cz>

Do you mean pidfd? In that case it has to be applied also for the all 
the other patches as following:

diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c 
b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
index df4bec384..66b96a29c 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
@@ -44,6 +44,10 @@ static void run(void)
                 TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), ESRCH);
                 exit(0);
         }
+
+       tst_reap_children();
+
+       SAFE_CLOSE(pidfd);
  }

  static void setup(void)

- Andrea



More information about the ltp mailing list