[LTP] [PATCH 0/6] ioctl_pidfd testing suite

Cyril Hrubis chrubis@suse.cz
Tue Jul 1 13:40:50 CEST 2025


Hi!
> > I guess that we miss a test for the case where the processes are in the
> > same pid namespace, e.g. process created by a plain old fork(). In that
> > case calling the ioctl() before the the process was waited for would
> > return the information I've mistakenly pointed out for the second test.
> 
> Sorry but I don't get this one. When we fork() a process and we check 
> its exit code via ioctl(PIDFD_GET_INFO) __before__ the child has been 
> reaped, we only need to check if mask is still having PIDFD_INFO_EXIT, 
> because that's not available.The same for exit_code.
> 
> Am I missing something?

That paragraph was still written under the assumption that you are not
supposed to get anything else than exit vaule from a process that is in
a different namespace.

The main point should have been that all the tests you have sumbitted
are written so that the child process is cloned into a new pid
namespace. We need at least one test where both the child and the parent
are in the same namespace. Either cloned without pid namespace or
created by plain old fork().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list