kunit: fix Kconfig for build-in tests USB4 and Nitro Enclaves
authorNico Pache <npache@redhat.com>
Wed, 10 Aug 2022 23:40:56 +0000 (19:40 -0400)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 1 Sep 2022 19:00:48 +0000 (13:00 -0600)
Both the USB4 and Nitro Enclaves KUNIT tests are now able to be compiled
if KUNIT is compiled as a module. This leads to issues if KUNIT is being
packaged separately from the core kernel and when KUNIT is run baremetal
without the required driver compiled into the kernel.

Fixes: 635dcd16844b ("thunderbolt: test: Use kunit_test_suite() macro")
Fixes: fe5be808fa6c ("nitro_enclaves: test: Use kunit_test_suite() macro")
Signed-off-by: Nico Pache <npache@redhat.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Andra Paraschiv <andraprs@amazon.com>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
drivers/thunderbolt/Kconfig
drivers/virt/nitro_enclaves/Kconfig

index e76a6c1736376b976ad4f737dd98139eff5eafb8..f12d0a3ee3e253049aad5e2b34a4155be56f80e8 100644 (file)
@@ -29,8 +29,7 @@ config USB4_DEBUGFS_WRITE
 
 config USB4_KUNIT_TEST
        bool "KUnit tests" if !KUNIT_ALL_TESTS
-       depends on (USB4=m || KUNIT=y)
-       depends on KUNIT
+       depends on USB4 && KUNIT=y
        default KUNIT_ALL_TESTS
 
 config USB4_DMA_TEST
index ce91add81401a22805d253a585d2b15b11572a31..dc4d25c26256e53a341ca881cbf9fa2561794de0 100644 (file)
@@ -17,7 +17,7 @@ config NITRO_ENCLAVES
 
 config NITRO_ENCLAVES_MISC_DEV_TEST
        bool "Tests for the misc device functionality of the Nitro Enclaves" if !KUNIT_ALL_TESTS
-       depends on NITRO_ENCLAVES && KUNIT
+       depends on NITRO_ENCLAVES && KUNIT=y
        default KUNIT_ALL_TESTS
        help
          Enable KUnit tests for the misc device functionality of the Nitro