[LTP] [PATCH] epoll_pwait06: Skip BPF map file descriptor
Cyril Hrubis
chrubis@suse.cz
Wed Sep 24 13:52:15 CEST 2025
Hi!
> >> diff --git a/testcases/kernel/syscalls/epoll_pwait/epoll_pwait06.c b/testcases/kernel/syscalls/epoll_pwait/epoll_pwait06.c
> >> index 3bedc2cf5..d47327bed 100644
> >> --- a/testcases/kernel/syscalls/epoll_pwait/epoll_pwait06.c
> >> +++ b/testcases/kernel/syscalls/epoll_pwait/epoll_pwait06.c
> >> @@ -36,6 +36,7 @@ static void run(void)
> >> case TST_FD_DIR:
> >> case TST_FD_DEV_ZERO:
> >> case TST_FD_PROC_MAPS:
> >> + case TST_FD_BPF_MAP:
> >> case TST_FD_FSOPEN:
> >> case TST_FD_FSPICK:
> >> case TST_FD_OPEN_TREE:
> >
> > Can we make this kernel version dependent? I do not like disabling tests
> > that work on newer kernels just because it does not work on something
> > that is eight years old.
>
> 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.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list