Browse Source

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>
Paul Elder 8 years ago
parent
commit
54f57baab6
1 changed files with 5 additions and 2 deletions
  1. 5 2
      tools/testing/selftests/kselftest.h

+ 5 - 2
tools/testing/selftests/kselftest.h

@@ -104,9 +104,12 @@ static inline int ksft_exit_xpass(void)
 	exit(KSFT_XPASS);
 	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);
 	exit(KSFT_SKIP);
 }
 }