[LTP] [PATCH] close_range: check for kernel support below 5.9

Petr Vorel pvorel@suse.cz
Mon Feb 6 06:36:49 CET 2023


Hi Edward,

> Hey Petr,

> We turned on the HAVE_CLOSE_RANGE flag to test the bionic-defined
> close_range on Android, but doing so bypasses tst_syscall in
> include/lapi/close_range.h.  We don't currently have a way to
> configure ltp differently across each kernel version, so I wanted to
> use this check as a fallback to gate earlier kernels.

Thanks for info. OK, at least it's needed :).
If these fixes would be needed for more syscalls, we might want to check if
there is a way to enhance tst_syscall() (likely there is no way).

Also (for next time) it's always safe to be more verbose for the reason in the
commit message to prevent cleanup of workarounds too early (before EOL of that
particular kernel).

Kind regards,
Petr

> Thanks,
> Edward


> On Fri, Feb 3, 2023 at 2:25 AM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi,

> > hm, I was too fast to merge it. Looking at older result,
> > It looks like this (merged as 7b5ee03899) was not needed,
> > because tst_syscall() properly detects missing support:

> > close_range01.c:134: TINFO: Plain close range
> > ../../../../include/lapi/close_range.h:25: TCONF: syscall(436) __NR_close_range not supported on your arch

> > @Edward: Before we revert it, did you encounter some problem that it's really
> > needed? If yes, please share details.

> > Kind regards,
> > Petr


More information about the ltp mailing list