summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kselftest.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2019-04-25 02:12:33 +0300
committerShuah Khan <skhan@linuxfoundation.org>2019-04-25 22:14:45 +0300
commitb0df366bbd701c45e93af0dcb87ce22398589d1d (patch)
tree2252902b213c65b178d6a37a17ca0aaa568d9bf2 /tools/testing/selftests/kselftest.h
parentbf66078235ca27062f5924ed6901f40becc4a1a4 (diff)
downloadlinux-b0df366bbd701c45e93af0dcb87ce22398589d1d.tar.xz
selftests: Add plan line and fix result line syntax
The TAP version 13 spec requires a "plan" line, which has been missing. Since we always know how many tests we're going to run, emit the count on the plan line. This also fixes the result lines to remove the "1.." prefix which is against spec, and to mark skips with the correct "# SKIP" suffix. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/kselftest.h')
-rw-r--r--tools/testing/selftests/kselftest.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 47e1d995c182..9f4147a6fdbc 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -111,7 +111,7 @@ static inline void ksft_test_result_skip(const char *msg, ...)
ksft_cnt.ksft_xskip++;
va_start(args, msg);
- printf("ok %d # skip ", ksft_test_num());
+ printf("not ok %d # SKIP ", ksft_test_num());
vprintf(msg, args);
va_end(args);
}
@@ -172,7 +172,7 @@ static inline int ksft_exit_skip(const char *msg, ...)
va_list args;
va_start(args, msg);
- printf("1..%d # Skipped: ", ksft_test_num());
+ printf("not ok %d # SKIP ", ksft_test_num());
vprintf(msg, args);
va_end(args);
} else {