Skip to contentSkip to conversation

drivers: base: test: Depend on OF instead of selecting it

PATCH In review Ricardo Ribalda 2 participants 2 messages Aug 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: base: test: Depend on OF instead of selecting it

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.

Fixes 0e6f8ccd4618 ("device property: add test cases for fwnode_for_each_child_node()")
---
 drivers/base/test/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/base/test/Kconfig +1 -2
index 542ce07530a1..292cf33fbaad 100644
@@ -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,

Signature · 1 line
Ricardo Ribalda <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ricardo Ribalda

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.

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

Signature · 2 lines
With Best Regards,
Andy Shevchenko