Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: Allow kunit tests to run without OF_OVERLAY enabled

Some configurations want to enable CONFIG_KUNIT without enabling
CONFIG_OF_OVERLAY. The kunit overlay code already skips if
CONFIG_OF_OVERLAY isn't enabled, so these selects here aren't really
doing anything besides making it easier to run the tests without them
skipping. Remove the select and move the config setting to the
drivers/clk/.kunitconfig file so that the clk tests can be run with or
without CONFIG_OF_OVERLAY set to test either behavior.

Fixes: 5776526beb95 ("clk: Add KUnit tests for clk fixed rate basic type")
Fixes: 274aff8711b2 ("clk: Add KUnit tests for clks registered with struct clk_parent_data")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20241016212738.897691-1-sboyd@kernel.org

+1 -2
+1
drivers/clk/.kunitconfig
··· 1 1 CONFIG_KUNIT=y 2 2 CONFIG_OF=y 3 + CONFIG_OF_OVERLAY=y 3 4 CONFIG_COMMON_CLK=y 4 5 CONFIG_CLK_KUNIT_TEST=y 5 6 CONFIG_CLK_FIXED_RATE_KUNIT_TEST=y
-2
drivers/clk/Kconfig
··· 517 517 tristate "Basic Clock Framework Kunit Tests" if !KUNIT_ALL_TESTS 518 518 depends on KUNIT 519 519 default KUNIT_ALL_TESTS 520 - select OF_OVERLAY if OF 521 520 select DTC 522 521 help 523 522 Kunit tests for the common clock framework. ··· 525 526 tristate "Basic fixed rate clk type KUnit test" if !KUNIT_ALL_TESTS 526 527 depends on KUNIT 527 528 default KUNIT_ALL_TESTS 528 - select OF_OVERLAY if OF 529 529 select DTC 530 530 help 531 531 KUnit tests for the basic fixed rate clk type.