kernel: Kconfig: Increase the main stack size for ARM when TEST

The following testcases fail with qemu_cortex_r5 caused by main stack
overflow.
tests/kernel/workq/work_queue/kernel.workqueue
tests/ztest/base/testing.ztest.base.verbose_0_userspace

The main stack size is 512 for qemu_cortex_r5(a Cortex-A/R aarch32
platform) with CONFIG_ZTEST=y. The Cortex-M platforms are already set to
1024. Likely 512 will fail for most aarch32 platforms soon.

Fix the issue by increasing the CONFIG_MAIN_STACK_SIZE to 1024.
Also, remove 'default 1024 if TEST_ARM_CORTEX_M' since Cortex-M is no
longer an exception of default 1024.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
This commit is contained in:
Jaxson Han 2022-12-09 14:37:46 +08:00 committed by Stephanos Ioannidis
parent 7c9d792211
commit bba9fc9853

View file

@ -156,8 +156,7 @@ config SCHED_CPU_MASK_PIN_ONLY
config MAIN_STACK_SIZE
int "Size of stack for initialization and main thread"
default 2048 if COVERAGE_GCOV
default 1024 if TEST_ARM_CORTEX_M
default 512 if ZTEST && !(RISCV || X86)
default 512 if ZTEST && !(RISCV || X86 || ARM)
default 1024
help
When the initialization is complete, the thread executing it then