diff options
author | zhang jiao <zhangjiao2@cmss.chinamobile.com> | 2024-09-11 12:42:30 +0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-09-11 09:52:33 -0600 |
commit | a0474b8d5974e142461ac7584c996feea167bcc1 (patch) | |
tree | 10abce87b53d4fcc03fc50a0e46203a99dc6907d | |
parent | af1ec38c6ccc31ec963ac4bcf8f6a7d8f44d210a (diff) |
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>
-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) |