[LTP] [PATCH v2 4/8] Add ioctl_pidfd02 test

Andrea Cervesato andrea.cervesato@suse.com
Mon Jul 7 18:06:23 CEST 2025


On 7/7/25 5:37 PM, Cyril Hrubis wrote:
> Hi!
>>> Looking at the kernel code it looks that if the PIDFD_INFO_EXIT is not
>>> supported we will get ESRCH in the second case. So I suppose that better
>>> fix would be to allow ESRCH in the second case if kernel is older than
>>> 6.15 instead of skipping the whole test.
>> Maybe it makes more sense to check PIDFD_INFO_EXIT is available via
>> configure.ac and eventually check for this support in the setup(). So we
>> avoid weird runtime checks. WDYT?
> And if you think about checking PIDFD_INFO_EXIT in the test setup() that
> may be doable. But there is no need for configure checks in that case,
> we just use PIDFD_INFO_EXIT fallback definition from the lapi headers.
>
> I suppose adding a check for support that would be called if kernel
> version is older than 6.15 would work as well.
>
If PIDFD_INFO_EXIT is defined, then struct pidfd_info.exit_code will be defined. We can verify this via configure.ac.



More information about the ltp mailing list