kunit: test: add test plan to KUnit TAP format
authorBrendan Higgins <brendanhiggins@google.com>
Tue, 4 Aug 2020 20:47:44 +0000 (13:47 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 9 Oct 2020 20:37:49 +0000 (14:37 -0600)
commit45dcbb6f5ef78b0a9c1b91bea2f6f227642a65aa
tree3b1166347c5ae73bf8f4b7101651a1bb633474db
parent8c0d884986ba22f1020be9c02e41c030890ee8f2
kunit: test: add test plan to KUnit TAP format

TAP 14 allows an optional test plan to be emitted before the start of
the start of testing[1]; this is valuable because it makes it possible
for a test harness to detect whether the number of tests run matches the
number of tests expected to be run, ensuring that no tests silently
failed.

Link[1]: https://github.com/isaacs/testanything.github.io/blob/tap14/tap-version-14-specification.md#the-plan
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/executor.c
lib/kunit/test.c
tools/testing/kunit/kunit_parser.py
tools/testing/kunit/test_data/test_is_test_passed-all_passed.log
tools/testing/kunit/test_data/test_is_test_passed-crash.log
tools/testing/kunit/test_data/test_is_test_passed-failure.log