diff options
author | zhang jiao <zhangjiao2@cmss.chinamobile.com> | 2024-09-11 06:42:30 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-09-11 17:52:33 +0200 |
commit | a0474b8d5974e142461ac7584c996feea167bcc1 (patch) | |
tree | 10abce87b53d4fcc03fc50a0e46203a99dc6907d /tools/testing/selftests/kselftest.h | |
parent | selftests/timers: Remove unused NSEC_PER_SEC macro (diff) | |
download | linux-a0474b8d5974e142461ac7584c996feea167bcc1.tar.xz linux-a0474b8d5974e142461ac7584c996feea167bcc1.zip |
selftests: kselftest: Use strerror() on nolibc
Nolibc gained an implementation of strerror() recently.
Use it and drop the ifndef.
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/kselftest.h')
-rw-r--r-- | tools/testing/selftests/kselftest.h | 8 |
1 files changed, 0 insertions, 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) |