From: Shuah Khan <skhan@linuxfoundation.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: zhangjiao2 <zhangjiao2@cmss.chinamobile.com>,
Willy Tarreau <w@1wt.eu>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@kernel.org>,
shuah@kernel.org, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: kselftest: Use strerror() on nolibc
Date: Wed, 11 Sep 2024 11:41:45 -0600 [thread overview]
Message-ID: <449d19f6-5869-43c6-81d3-7f77d4e4d449@linuxfoundation.org> (raw)
In-Reply-To: <16611552-10d8-46d0-8163-460c0cbec2e5@t-8ch.de>
On 9/11/24 09:44, Thomas Weißschuh wrote:
> Hi Shuah,
>
> On 2024-09-11 09:36:50+0000, Shuah Khan wrote:
>> On 9/10/24 22:42, zhangjiao2 wrote:
>>> From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
>>>
>>> Nolibc gained an implementation of strerror() recently.
>>> Use it and drop the ifndef.
>>>
>>> Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
>>> ---
>>> 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 e195ec156859..29fedf609611 100644
>>> --- a/tools/testing/selftests/kselftest.h
>>> +++ b/tools/testing/selftests/kselftest.h
>>> @@ -373,15 +373,7 @@ static inline __noreturn __printf(1, 2) void ksft_exit_fail_msg(const char *msg,
>>> static inline __noreturn void ksft_exit_fail_perror(const char *msg)
>>> {
>>> -#ifndef NOLIBC
>>> ksft_exit_fail_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_exit_fail_msg("%s: %d)\n", msg, errno);
>>> -#endif
>>> }
>>> static inline __noreturn void ksft_exit_xfail(void)
>>
>> Adding nolibc maintainers for review.
>>
>> Willy and Thomas, please review.
>
> Acked-by: Thomas Weißschuh <linux@weissschuh.net>
>
> I did the same for another kselftests function when introducing
> strerror(). This one was apparently missed or didn't exist yet.
>
>
Thank you. Applied to linux-kselftest next for Linux 6.12-rc1.
thanks,
-- Shuah
prev parent reply other threads:[~2024-09-11 17:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 4:42 [PATCH] selftests: kselftest: Use strerror() on nolibc zhangjiao2
2024-09-11 15:36 ` Shuah Khan
2024-09-11 15:44 ` Thomas Weißschuh
2024-09-11 17:41 ` Shuah Khan [this message]
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=449d19f6-5869-43c6-81d3-7f77d4e4d449@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=paulmck@kernel.org \
--cc=shuah@kernel.org \
--cc=w@1wt.eu \
--cc=zhangjiao2@cmss.chinamobile.com \
/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