[PATCH] drivers: base: test: Depend on OF instead of selecting it

Ricardo Ribalda posted 1 patch 1 month, 1 week ago
drivers/base/test/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] drivers: base: test: Depend on OF instead of selecting it
Posted by Ricardo Ribalda 1 month, 1 week ago
Selecting OF instead of depending on it makes it impossible to
disable OF when KUNIT_ALL_TESTS is selected.

The purpose of KUNIT_ALL_TESTS is to test everything with satisfied
dependencies, not to force dependencies.

Cc: stable@vger.kernel.org
Fixes: 0e6f8ccd4618 ("device property: add test cases for fwnode_for_each_child_node()")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/base/test/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
index 542ce07530a1..292cf33fbaad 100644
--- a/drivers/base/test/Kconfig
+++ b/drivers/base/test/Kconfig
@@ -16,8 +16,7 @@ config DM_KUNIT_TEST
 
 config DRIVER_PE_KUNIT_TEST
 	tristate "KUnit Tests for property entry API" if !KUNIT_ALL_TESTS
-	depends on KUNIT
-	select OF
+	depends on KUNIT && OF
 	default KUNIT_ALL_TESTS
 
 config DRIVER_SWNODE_KUNIT_TEST

---
base-commit: 4477a78374a57c3809b172ad30cceabda48c47c6
change-id: 20260817-driver-pe-50ae7a9abb31

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>
Re: [PATCH] drivers: base: test: Depend on OF instead of selecting it
Posted by Andy Shevchenko 1 month, 1 week ago
On Mon, Aug 17, 2026 at 11:54:44AM +0000, Ricardo Ribalda wrote:
> Selecting OF instead of depending on it makes it impossible to
> disable OF when KUNIT_ALL_TESTS is selected.
> 
> The purpose of KUNIT_ALL_TESTS is to test everything with satisfied
> dependencies, not to force dependencies.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Shouldn't we also handle this in tools/testing/kunit/configs/all_tests.config?
(maybe in the future).

-- 
With Best Regards,
Andy Shevchenko