Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Shuah Khan <shuah@kernel.org>
Cc: Willy Tarreau <w@1wt.eu>,
	linux-kselftest@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] selftests: kselftest: also use strerror() on nolibc
Date: Mon, 27 May 2024 18:11:46 +0200	[thread overview]
Message-ID: <56ea48ee-e278-4f37-a80f-9fd70d9d8d3b@t-8ch.de> (raw)
In-Reply-To: <20240426-nolibc-strerror-v1-3-76a4c9c5271d@weissschuh.net>

Hi Shuah,

Could you Ack the patch below to kselftest.h?

Thanks,
Thomas

On 2024-04-26 13:08:58+0000, Thomas Weißschuh wrote:
> nolibc gained an implementation of strerror() recently.
> Use it and drop the ifdeffery.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
>  tools/testing/selftests/kselftest.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
> index 541bf192e30e..f4bfe98c31e4 100644
> --- a/tools/testing/selftests/kselftest.h
> +++ b/tools/testing/selftests/kselftest.h
> @@ -161,15 +161,7 @@ static inline __printf(1, 2) void ksft_print_msg(const char *msg, ...)
>  
>  static inline void ksft_perror(const char *msg)
>  {
> -#ifndef NOLIBC
>  	ksft_print_msg("%s: %s (%d)\n", msg, strerror(errno), errno);
> -#else
> -	/*
> -	 * nolibc doesn't provide strerror() and it seems
> -	 * inappropriate to add one, just print the errno.
> -	 */
> -	ksft_print_msg("%s: %d)\n", msg, errno);
> -#endif
>  }
>  
>  static inline __printf(1, 2) void ksft_test_result_pass(const char *msg, ...)
> 
> -- 
> 2.44.0
> 

  reply	other threads:[~2024-05-27 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 11:08 [PATCH 0/3] tools/nolibc: implement strerror() Thomas Weißschuh
2024-04-26 11:08 ` [PATCH 1/3] selftests/nolibc: introduce condition to run tests only on nolibc Thomas Weißschuh
2024-04-26 11:08 ` [PATCH 2/3] tools/nolibc: implement strerror() Thomas Weißschuh
2024-04-26 11:08 ` [PATCH 3/3] selftests: kselftest: also use strerror() on nolibc Thomas Weißschuh
2024-05-27 16:11   ` Thomas Weißschuh [this message]
2024-06-28 20:56     ` Shuah Khan
2024-06-28 21:25   ` Shuah Khan
2024-05-02 16:10 ` [PATCH 0/3] tools/nolibc: implement strerror() Thomas Weißschuh
2024-06-28 21:46   ` Shuah Khan

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=56ea48ee-e278-4f37-a80f-9fd70d9d8d3b@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --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