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@xxxxxxxxxx>
Tested-by: Marco Elver <elver@xxxxxxxxxx>
Reviewed-by: Daniel Latypov <dlatypov@xxxxxxxxxx>
Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>
---
Changes since v4:
https://lore.kernel.org/linux-kselftest/20210611070802.1318911-1-davidgow@xxxxxxxxxx/
- Rebase on top of kselftest/kunit-fixes as of 2021-06-25
- This is as of commit c1610aae49 ("kunit: tool: internal refactor of parser input handling")