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-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 3/3] selftests: kselftest: also use strerror() on nolibc
Date: Fri, 28 Jun 2024 15:25:37 -0600	[thread overview]
Message-ID: <91d2f8dd-0de5-4959-8fd4-4c142b6a4f62@linuxfoundation.org> (raw)
In-Reply-To: <20240426-nolibc-strerror-v1-3-76a4c9c5271d@weissschuh.net>

On 4/26/24 05:08, 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, ...)
> 

Sorry for the delay o this.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

  parent reply	other threads:[~2024-06-28 21:25 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
2024-06-28 20:56     ` Shuah Khan
2024-06-28 21:25   ` Shuah Khan [this message]
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=91d2f8dd-0de5-4959-8fd4-4c142b6a4f62@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