linux-stable/lib/kunit
David Gow 6d2426b2f2 kunit: Support skipped tests
The kunit_mark_skipped() macro marks the current test as "skipped", with
the provided reason. The kunit_skip() macro will mark the test as
skipped, and abort the test.

The TAP specification supports this "SKIP directive" as a comment after
the "ok" / "not ok" for a test. See the "Directives" section of the TAP
spec for details:
https://testanything.org/tap-specification.html#directives

The 'success' field for KUnit tests is replaced with a kunit_status
enum, which can be SUCCESS, FAILURE, or SKIPPED, combined with a
'status_comment' containing information on why a test was skipped.

A new 'kunit_status' test suite is added to test this.

Signed-off-by: David Gow <davidgow@google.com>
Tested-by: Marco Elver <elver@google.com>
Reviewed-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-06-25 11:31:03 -06:00
..
.kunitconfig kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment 2021-04-02 14:14:36 -06:00
assert.c kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals 2021-04-02 14:14:16 -06:00
debugfs.c kunit: Support skipped tests 2021-06-25 11:31:03 -06:00
debugfs.h kunit: add debugfs /sys/kernel/debug/kunit/<suite>/results display 2020-03-26 14:07:18 -06:00
executor.c kunit: Add 'kunit_shutdown' option 2021-06-11 16:04:57 -06:00
Kconfig kunit: add kunit.filter_glob cmdline option to filter suites 2021-02-08 16:09:27 -07:00
kunit-example-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
kunit-test.c kunit: Support skipped tests 2021-06-25 11:31:03 -06:00
Makefile kunit: test: create a single centralized executor for all tests 2020-10-09 14:37:34 -06:00
string-stream-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
string-stream.c kunit: generalize kunit_resource API beyond allocated resources 2020-06-26 14:12:00 -06:00
string-stream.h kunit: Add gnu_printf specifiers 2021-06-23 17:06:04 -06:00
test.c kunit: Support skipped tests 2021-06-25 11:31:03 -06:00
try-catch-impl.h kunit: hide unexported try-catch interface in try-catch-impl.h 2020-01-09 16:42:09 -07:00
try-catch.c kunit: remove timeout dependence on sysctl_hung_task_timeout_seconds 2020-01-09 16:42:55 -07:00