aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/kunit/test_data
diff options
context:
space:
mode:
authorDavid Gow <davidgow@google.com>2021-11-02 00:30:12 -0700
committerShuah Khan <skhan@linuxfoundation.org>2021-12-13 13:36:15 -0700
commite56e482855b782b0e38b91cc383324bb80461073 (patch)
treec0ba53548cb4406cac30b2437ff03e9da9dc2988 /tools/testing/kunit/test_data
parentkunit: tool: Do not error on tests without test plans (diff)
downloadlinux-dev-e56e482855b782b0e38b91cc383324bb80461073.tar.xz
linux-dev-e56e482855b782b0e38b91cc383324bb80461073.zip
kunit: tool: Report an error if any test has no subtests
It's possible for a test to have a subtest header, but zero valid subtests. We used to error on this if the test plan had no subtests listed, but it's possible to have subtests without a test plan (indeed, this is how parameterised tests work). Tests with 0 subtests now have the result NO_TESTS, and will report an error (which does not halt test execution, but is printed in a scary red colour and is noted in the results summary). Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit/test_data')
-rw-r--r--tools/testing/kunit/test_data/test_is_test_passed-no_tests_no_plan.log7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/kunit/test_data/test_is_test_passed-no_tests_no_plan.log b/tools/testing/kunit/test_data/test_is_test_passed-no_tests_no_plan.log
new file mode 100644
index 000000000000..dd873c981108
--- /dev/null
+++ b/tools/testing/kunit/test_data/test_is_test_passed-no_tests_no_plan.log
@@ -0,0 +1,7 @@
+TAP version 14
+1..1
+ # Subtest: suite
+ 1..1
+ # Subtest: case
+ ok 1 - case # SKIP
+ok 1 - suite