[LTP] [PATCH] epoll_pwait06: Skip BPF map file descriptor
Martin Doucha
mdoucha@suse.cz
Wed Sep 24 13:59:05 CEST 2025
On 9/24/25 13:52, Cyril Hrubis wrote:
> Hi!
>> I like kernel version checks even less. I could call epoll_ctl()
>> directly without the safe macro instead and check for EPERM. That's the
>> appropriate feature check.
>
> That does not work either. We had patches that were misapplied and broke
> kernel so that it wrongly returned error instead of the expected
> operation. Just checking for EPERM would silence such bugs.
>
> In the end I came to a conclusion that the only way how to make sure
> things are not broken is to expect that certain functionality is present
> either on CONFIG_ options or if that is not possible on kernel version.
> It's ugly but that's how things are.
I'll accept EPERM only for the file descriptor types which are now
unconditionally skipped. The only file descriptor type which could then
get skipped incorrectly will be BPF. But that's not a problem because
verifying epoll support is out of scope of this test. The primary
purpose is to verify that small epoll_pwait() timeouts won't get
misinterpreted as infinity. In theory, verifying that on a single file
descriptor type should be sufficient.
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list