Skip to content

Commit 6ca8f2e

Browse files
committed
selftests: kselftest: also use strerror() on nolibc
nolibc gained an implementation of strerror() recently. Use it and drop the ifdeffery. Acked-by: Shuah Khan <[email protected]> Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent d20d0b1 commit 6ca8f2e

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

tools/testing/selftests/kselftest.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,7 @@ static inline __printf(1, 2) void ksft_print_msg(const char *msg, ...)
168168

169169
static inline void ksft_perror(const char *msg)
170170
{
171-
#ifndef NOLIBC
172171
ksft_print_msg("%s: %s (%d)\n", msg, strerror(errno), errno);
173-
#else
174-
/*
175-
* nolibc doesn't provide strerror() and it seems
176-
* inappropriate to add one, just print the errno.
177-
*/
178-
ksft_print_msg("%s: %d)\n", msg, errno);
179-
#endif
180172
}
181173

182174
static inline __printf(1, 2) void ksft_test_result_pass(const char *msg, ...)

0 commit comments

Comments
 (0)