summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/test.c
diff options
context:
space:
mode:
authorDavid Gow <davidgow@google.com>2022-07-09 05:19:59 +0200
committerShuah Khan <skhan@linuxfoundation.org>2022-07-12 01:13:21 +0200
commit635dcd16844b08adcc1aa7a934893e47260619e4 (patch)
tree22596dfe58473df15eb6d0df4a977dee130d6e0d /drivers/thunderbolt/test.c
parentkunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites (diff)
downloadlinux-635dcd16844b08adcc1aa7a934893e47260619e4.tar.xz
linux-635dcd16844b08adcc1aa7a934893e47260619e4.zip
thunderbolt: test: Use kunit_test_suite() macro
The new implementation of kunit_test_suite() for modules no longer conflicts with module_init, so can now be used by the thunderbolt tests. Also update the Kconfig entry to enable the test when KUNIT_ALL_TESTS is enabled. This means that kunit_tool can now successfully run and parse the test results with, for example: ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kconfig_add CONFIG_PCI=y --kconfig_add CONFIG_USB4=y \ 'thunderbolt' Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Daniel Latypov <dlatypov@google.com> Acked-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt/test.c')
-rw-r--r--drivers/thunderbolt/test.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/thunderbolt/test.c b/drivers/thunderbolt/test.c
index ee37f8b58f50..24c06e7354cd 100644
--- a/drivers/thunderbolt/test.c
+++ b/drivers/thunderbolt/test.c
@@ -2817,14 +2817,4 @@ static struct kunit_suite tb_test_suite = {
.test_cases = tb_test_cases,
};
-static struct kunit_suite *tb_test_suites[] = { &tb_test_suite, NULL };
-
-int tb_test_init(void)
-{
- return __kunit_test_suites_init(tb_test_suites);
-}
-
-void tb_test_exit(void)
-{
- return __kunit_test_suites_exit(tb_test_suites);
-}
+kunit_test_suite(tb_test_suite);