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>
This commit is contained in:
Paul Elder 2017-06-16 00:54:20 +09:00 committed by Shuah Khan
parent 48e42f91c1
commit 54f57baab6
1 changed files with 5 additions and 2 deletions

View File

@ -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);
}