diff options
author | Paul Elder <paul.elder@pitt.edu> | 2017-06-15 11:54:20 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2017-06-15 20:07:45 -0400 |
commit | 54f57baab644e99b6da34d9538b2a9c0a05b690d (patch) | |
tree | 6dba8ca981a16bab86e7bc9bb2437152796f7626 /tools | |
parent | 48e42f91c10482992b474cc0874c0e33d76cb509 (diff) |
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 <paul.elder@pitt.edu>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kselftest.h | 7 |
1 files changed, 5 insertions, 2 deletions
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) | |||
104 | exit(KSFT_XPASS); | 104 | exit(KSFT_XPASS); |
105 | } | 105 | } |
106 | 106 | ||
107 | static inline int ksft_exit_skip(void) | 107 | static inline int ksft_exit_skip(const char *msg) |
108 | { | 108 | { |
109 | ksft_print_cnts(); | 109 | if (msg) |
110 | printf("1..%d # Skipped: %s\n", ksft_test_num(), msg); | ||
111 | else | ||
112 | ksft_print_cnts(); | ||
110 | exit(KSFT_SKIP); | 113 | exit(KSFT_SKIP); |
111 | } | 114 | } |
112 | 115 | ||