[LTP] [PATCH 0/6] ioctl_pidfd testing suite
Cyril Hrubis
chrubis@suse.cz
Fri Jun 27 12:14:13 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.
And we also do not have a tests for some error cases.
For instance a test that two processes in a different namespaces that
aren't in a parent-child relationship should fail with ESRCH regardless
the mask. I.e. if we clone two processes with CLONE_NEWPID they
shouldn't be able to retrieve exit value for each other.
And some minor checks, it looks like if we pass NULL arg (the info
structure pointer) we should get EINVAL. And we should be able to
trigger the case in kernel that checks usize < PIDFD_INFO_SIZE_VER0
with:
struct pidfd_info_invalid {
uint32_t dummy;
};
#define PIDFD_GET_INFO_SHORT _IOWR(PIDFS_IOCTL_MAGIC, 11, struct pidfd_info_invalid)
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list