diff options
| author | Stephen Boyd <sboyd@kernel.org> | 2024-10-16 14:20:15 -0700 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2024-11-15 14:03:28 -0600 |
| commit | 332857fdac73f1c7b74ad962c07bb39e4c0c145a (patch) | |
| tree | 538f8da404a95bbd9b36c7f65a1ee6285ba0abaf /drivers/of/overlay_test.c | |
| parent | 6e0391e48cf9fb8b1b5e27c0cbbaf2e4639f2c33 (diff) | |
of: Allow overlay kunit tests to run CONFIG_OF_OVERLAY=n
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 this select here isn'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/of/.kunitconfig file so that the overlay tests can be run with
or without CONFIG_OF_OVERLAY set to test either behavior.
Fixes: 5c9dd72d8385 ("of: Add a KUnit test for overlays and test managed APIs")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20241016212016.887552-1-sboyd@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/of/overlay_test.c')
| -rw-r--r-- | drivers/of/overlay_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/overlay_test.c b/drivers/of/overlay_test.c index 1f76d50fb16a..c787524c5a88 100644 --- a/drivers/of/overlay_test.c +++ b/drivers/of/overlay_test.c @@ -65,6 +65,8 @@ static void of_overlay_apply_kunit_cleanup(struct kunit *test) struct device_node *np; of_root_kunit_skip(test); + if (!IS_ENABLED(CONFIG_OF_OVERLAY)) + kunit_skip(test, "requires CONFIG_OF_OVERLAY to apply overlay"); if (!IS_ENABLED(CONFIG_OF_EARLY_FLATTREE)) kunit_skip(test, "requires CONFIG_OF_EARLY_FLATTREE for root node"); |
