selftests: Add plan line and fix result line syntax
authorKees Cook <keescook@chromium.org>
Wed, 24 Apr 2019 23:12:33 +0000 (16:12 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 25 Apr 2019 19:14:45 +0000 (13:14 -0600)
commitb0df366bbd701c45e93af0dcb87ce22398589d1d
tree2252902b213c65b178d6a37a17ca0aaa568d9bf2
parentbf66078235ca27062f5924ed6901f40becc4a1a4
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>
tools/testing/selftests/kselftest.h
tools/testing/selftests/kselftest/runner.sh