Commit 6ca8f2e2 authored by Thomas Weißschuh's avatar Thomas Weißschuh
Browse files

selftests: kselftest: also use strerror() on nolibc



nolibc gained an implementation of strerror() recently.
Use it and drop the ifdeffery.

Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
parent d20d0b10
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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, ...)