[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9abade09-4186-4730-b197-91d9fd622b1d@linuxfoundation.org>
Date: Wed, 26 Feb 2025 14:12:43 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Thomas Weißschuh <linux@...ssschuh.net>,
Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v2 2/2] Revert "selftests: kselftest: Fix build failure
with NOLIBC"
On 2/9/25 13:27, Thomas Weißschuh wrote:
> This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40.
>
> Nolibc gained support for uname(2) and sscanf(3) which are the
> dependencies of ksft_min_kernel_version().
>
> So re-enable support for ksft_min_kernel_version() under nolibc.
>
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
> ---
> tools/testing/selftests/kselftest.h | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
> index cdf91b0ca40fbdc4fb825b86d4dc547b5afa673c..c3b6d2604b1e486af5a224a11386f75fe0a83495 100644
> --- a/tools/testing/selftests/kselftest.h
> +++ b/tools/testing/selftests/kselftest.h
> @@ -444,10 +444,6 @@ static inline __noreturn __printf(1, 2) void ksft_exit_skip(const char *msg, ...
> static inline int ksft_min_kernel_version(unsigned int min_major,
> unsigned int min_minor)
> {
> -#ifdef NOLIBC
> - ksft_print_msg("NOLIBC: Can't check kernel version: Function not implemented\n");
> - return 0;
> -#else
> unsigned int major, minor;
> struct utsname info;
>
> @@ -455,7 +451,6 @@ static inline int ksft_min_kernel_version(unsigned int min_major,
> ksft_exit_fail_msg("Can't parse kernel version\n");
>
> return major > min_major || (major == min_major && minor >= min_minor);
> -#endif
> }
>
> #endif /* __KSELFTEST_H */
>
Looks good to me.
Acked-by: Shuah Khan <skhan@...uxfoundation.org>
thanks,
-- Shuah
Powered by blists - more mailing lists