From 058f256ea140026e46e458dd51036ea2c1f81b2a Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 10 Mar 2023 17:26:35 +0000 Subject: [PATCH] Kconfig.zephyr: check priorities by default Enable build time initialization priority check by default. Signed-off-by: Fabio Baltieri --- Kconfig.zephyr | 1 + tests/lib/devicetree/devices/prj.conf | 1 + tests/misc/check_init_priorities/prj.conf | 2 ++ tests/subsys/emul/prj.conf | 1 + 4 files changed, 5 insertions(+) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 9f9132eb753..d01cc55eea7 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -746,6 +746,7 @@ config BUILD_OUTPUT_STRIP_PATHS config CHECK_INIT_PRIORITIES bool "Build time initialization priorities check" + default y help Check the build for initialization priority issues by comparing the initialization priority in the build with the device dependency diff --git a/tests/lib/devicetree/devices/prj.conf b/tests/lib/devicetree/devices/prj.conf index c440074560f..fc3755cc035 100644 --- a/tests/lib/devicetree/devices/prj.conf +++ b/tests/lib/devicetree/devices/prj.conf @@ -2,3 +2,4 @@ CONFIG_ZTEST=y CONFIG_I2C=n CONFIG_ZTEST_NEW_API=y CONFIG_DEVICE_DEPS=y +CONFIG_CHECK_INIT_PRIORITIES=n diff --git a/tests/misc/check_init_priorities/prj.conf b/tests/misc/check_init_priorities/prj.conf index bd094fca874..bad7dc092f3 100644 --- a/tests/misc/check_init_priorities/prj.conf +++ b/tests/misc/check_init_priorities/prj.conf @@ -1,2 +1,4 @@ # Required to force 2 stage linking CONFIG_DEVICE_DEPS=y + +CONFIG_CHECK_INIT_PRIORITIES=n diff --git a/tests/subsys/emul/prj.conf b/tests/subsys/emul/prj.conf index 452d3c4f157..d58fa1ec674 100644 --- a/tests/subsys/emul/prj.conf +++ b/tests/subsys/emul/prj.conf @@ -6,3 +6,4 @@ CONFIG_ZTEST=y CONFIG_ZTEST_NEW_API=y CONFIG_SENSOR=y CONFIG_BMI160_TRIGGER_NONE=y +CONFIG_CHECK_INIT_PRIORITIES=n