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

Cyril Hrubis chrubis@suse.cz
Mon Jul 7 17:39:59 CEST 2025


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?
> 
> Forget about configure checks, these are useless since the version of
> the kernel never corresponds to the kernel headers installed on the
> system.
> 
> The only way how to do things is to check if something is present at a
> runtime.

To sum it up configure checks should be only used to detect if fallback
definitions should be enabled or not.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list