Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Willy Tarreau" <w@1wt.eu>, "Shuah Khan" <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v2 2/2] Revert "selftests: kselftest: Fix build failure with NOLIBC"
Date: Wed, 26 Feb 2025 14:12:43 -0700	[thread overview]
Message-ID: <9abade09-4186-4730-b197-91d9fd622b1d@linuxfoundation.org> (raw)
In-Reply-To: <20250209-nolibc-scanf-v2-2-c29dea32f1cd@weissschuh.net>

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@weissschuh.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@linuxfoundation.org>

thanks,
-- Shuah

  reply	other threads:[~2025-02-26 21:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 20:27 [PATCH v2 0/2] tools/nolibc: add support for [v]sscanf() Thomas Weißschuh
2025-02-09 20:27 ` [PATCH v2 1/2] " Thomas Weißschuh
2025-02-09 20:27 ` [PATCH v2 2/2] Revert "selftests: kselftest: Fix build failure with NOLIBC" Thomas Weißschuh
2025-02-26 21:12   ` Shuah Khan [this message]
2025-02-10  6:29 ` [PATCH v2 0/2] tools/nolibc: add support for [v]sscanf() Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9abade09-4186-4730-b197-91d9fd622b1d@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=shuah@kernel.org \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox