From: Paul Elder Date: Thu, 15 Jun 2017 15:54:20 +0000 (+0900) Subject: kselftest: make ksft_exit_skip() output a reason for skipping X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54f57baab644e99b6da34d9538b2a9c0a05b690d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git kselftest: make ksft_exit_skip() output a reason for skipping Make ksft_exit_skip() input an optional message string as the reason for skipping all the tests and outputs it prior to exiting. Signed-off-by: Paul Elder Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index 1d874a50d957..be01f2d15472 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -104,9 +104,12 @@ static inline int ksft_exit_xpass(void) exit(KSFT_XPASS); } -static inline int ksft_exit_skip(void) +static inline int ksft_exit_skip(const char *msg) { - ksft_print_cnts(); + if (msg) + printf("1..%d # Skipped: %s\n", ksft_test_num(), msg); + else + ksft_print_cnts(); exit(KSFT_SKIP); }