Lines Matching +full:event +full:- +full:tap
1 .. SPDX-License-Identifier: GPL-2.0
7 TAP, or the Test Anything Protocol is a format for specifying test results used
9 <https://testanything.org/>`_. The Linux Kernel largely uses TAP output for test
11 which don't align with the original TAP specification. Thus, a "Kernel TAP"
12 (KTAP) format is specified to extend and alter TAP to support these use-cases.
17 can have subtests), each of which can contain both diagnostic data -- e.g., log
18 lines -- and a final result. The test structure and results are
19 machine-readable, whereas the diagnostic data is unstructured and is there to
23 - Version lines
24 - Plan lines
25 - Test case result lines
26 - Diagnostic lines
28 In general, valid KTAP output should also form valid TAP output, but some
35 -------------
37 All KTAP-formatted results begin with a "version line" which specifies which
38 version of the (K)TAP standard the result is compliant with.
41 - "KTAP version 1"
42 - "TAP version 13"
43 - "TAP version 14"
54 ----------
61 While there are cases where the number of tests is not known in advance -- in
62 which case the test plan may be omitted -- it is strongly recommended one is
66 ----------------------
71 .. code-block:: none
91 keyword preceding the diagnostic data. In the event that a parser encounters
97 - "SKIP", which indicates a test was skipped (note the result of the test case
99 - "TODO", which indicates that a test is not expected to pass at the moment,
101 directive is inherited from TAP, its use in the kernel is discouraged.
102 - "XFAIL", which indicates that a test is expected to fail. This is similar
104 - “TIMEOUT”, which indicates a test has timed out (note the result of the test
106 - “ERROR”, which indicates that the execution of a test has failed due to a
110 The diagnostic data is a plain-text field which contains any additional details
151 ----------------
169 -------------
175 This is an important difference from TAP. Kernel tests may print messages
178 messages from non-test code that is invoked by the test. The kernel code
183 ------------
186 output an entire set of KTAP-formatted results. This can be used to categorize
232 Major differences between TAP and KTAP
233 --------------------------------------
236 Feature TAP KTAP
250 --------------------
279 - "example_test_1", which passes, and has one subtest:
281 - "test_1", which passes, and outputs the diagnostic message "test_1: initializing test_1"
283 - "example_test_2", which passes, and has two subtests:
285 - "test_1", which is skipped, with the explanation "test_1 skipped"
286 - "test_2", which passes
288 - "example_test_3", which fails, and has three subtests
290 - "test_1", which passes
291 - "test_2", which outputs the diagnostic line "test_2: FAIL", and fails.
292 - "test_3", which is skipped with the explanation "test_3 skipped"
302 ---------
304 - The TAP specification:
305 https://testanything.org/tap-version-13-specification.html
306 - The (stagnant) TAP version 14 specification:
307 https://github.com/TestAnything/Specification/blob/tap-14-specification/specification.md
308 - The kselftest documentation:
309 Documentation/dev-tools/kselftest.rst
310 - The KUnit documentation:
311 Documentation/dev-tools/kunit/index.rst