thunderbolt: test: Use kunit_test_suite() macro
authorDavid Gow <davidgow@google.com>
Sat, 9 Jul 2022 03:19:59 +0000 (11:19 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 11 Jul 2022 23:13:21 +0000 (17:13 -0600)
commit635dcd16844b08adcc1aa7a934893e47260619e4
tree22596dfe58473df15eb6d0df4a977dee130d6e0d
parente5857d396f35e59e6fe96cf1178b0357cc3a1ea4
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>
drivers/thunderbolt/Kconfig
drivers/thunderbolt/domain.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/test.c