diff --git a/tests/ztest/Kconfig b/tests/ztest/Kconfig index ea9cafe74e1..b48f5d41cd1 100644 --- a/tests/ztest/Kconfig +++ b/tests/ztest/Kconfig @@ -14,7 +14,7 @@ config ZTEST config ZTEST_STACKSIZE int "Test function thread stack size" depends on ZTEST - default 1000 + default 1024 config ZTEST_FAIL_FAST bool "Abort on first failing test" diff --git a/tests/ztest/src/ztest.c b/tests/ztest/src/ztest.c index 28b1bb47c85..8c7ac05c082 100644 --- a/tests/ztest/src/ztest.c +++ b/tests/ztest/src/ztest.c @@ -125,7 +125,10 @@ out: #define FAIL_FAST 0 #endif -static char thread_stack[CONFIG_ZTEST_STACKSIZE]; +#if CONFIG_ZTEST_STACKSIZE & (STACK_ALIGN - 1) + #error "CONFIG_ZTEST_STACKSIZE must be a multiple of the stack alignment" +#endif +static char __stack thread_stack[CONFIG_ZTEST_STACKSIZE]; static int test_result; static struct k_sem mutex;