[LTP] [PATCH] close_range: check for kernel support below 5.9
Petr Vorel
pvorel@suse.cz
Wed Feb 1 13:24:57 CET 2023
Hi Edward,
good catch :).
Reviewed-by: Petr Vorel <pvorel@suse.cz>
...
> +++ b/include/lapi/close_range.h
> @@ -25,4 +25,17 @@ static inline int close_range(unsigned int fd, unsigned int max_fd,
> return tst_syscall(__NR_close_range, fd, max_fd, flags);
> }
> # endif
> +
> +static inline void close_range_supported_by_kernel(void)
> +{
> + long ret;
> +
> + if ((tst_kvercmp(5, 9, 0)) < 0) {
> + /* Check if the syscall is backported on an older kernel */
BTW what particular use case this fixed? Is it backported to some android
kernel? Or to some enterprise distro? Because I don't think kernel stable trees
accept new functionality, just fixes.
Kind regards,
Petr
More information about the ltp
mailing list