summaryrefslogtreecommitdiff
path: root/tools/testing/kunit
diff options
context:
space:
mode:
authorDavid Gow <davidgow@google.com>2021-10-06 07:41:11 +0300
committerShuah Khan <skhan@linuxfoundation.org>2021-10-19 23:22:02 +0300
commit17ac23eb43f0cbefc8bfce44ad51a9f065895f9f (patch)
treea95cec9f162e0761191912a767278d4edc626840 /tools/testing/kunit
parentd65d07cb5b01dcf3707b9cd7987ead96bd41b3cb (diff)
downloadlinux-17ac23eb43f0cbefc8bfce44ad51a9f065895f9f.tar.xz
kunit: Reset suite count after running tests
There are some KUnit tests (KFENCE, Thunderbolt) which, for various reasons, do not use the kunit_test_suite() macro and end up running before the KUnit executor runs its tests. This means that their results are printed separately, and they aren't included in the suite count used by the executor. This causes the executor output to be invalid TAP, however, as the suite numbers used are no-longer 1-based, and don't match the test plan. kunit_tool, therefore, prints a large number of warnings. While it'd be nice to fix the tests to run in the executor, in the meantime, reset the suite counter to 1 in __kunit_test_suites_exit. Not only does this fix the executor, it means that if there are multiple calls to __kunit_test_suites_init() across different tests, they'll each get their own numbering. kunit_tool likes this better: even if it's lacking the results for those tests which don't use the executor (due to the lack of TAP header), the output for the other tests is valid. Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Daniel Latypov <dlatypov@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit')
0 files changed, 0 insertions, 0 deletions