diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-04-26 13:08:58 +0200 |
---|---|---|
committer | Thomas Weißschuh <linux@weissschuh.net> | 2024-06-29 09:44:58 +0200 |
commit | 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b (patch) | |
tree | b7adfb76639d6fb15e406b37ef2515b5f681f6ce /tools/testing | |
parent | d20d0b10f883085a44afd1a3af1bbd77ed53acf7 (diff) |
selftests: kselftest: also use strerror() on nolibc
nolibc gained an implementation of strerror() recently.
Use it and drop the ifdeffery.
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/testing')
-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 76c2a6945d3e..b8967b6e29d5 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -168,15 +168,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, ...) |