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

Cyril Hrubis chrubis@suse.cz
Wed Jul 23 16:03:29 CEST 2025


Hi!
> 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();

Don't we wait() for the children in the test?

> +       SAFE_CLOSE(pidfd);

Otherwise yes, we need to close the pidfd at the end of the iteration.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list