Skip to content

Commit 45dbb8e

Browse files
committed
tests: Increase a couple of test stack sizes
mem_protect and sprintf stacks both need to be slightly larger than currently defined in order to avoid stack overflow when using picolibc. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent 462dc97 commit 45dbb8e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

tests/kernel/mem_protect/userspace/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,9 +1046,9 @@ void kernel_only_thread_entry(void *p1, void *p2, void *p3)
10461046
}
10471047

10481048
#ifdef CONFIG_MMU
1049-
#define KERNEL_ONLY_THREAD_STACK_SIZE (ROUND_UP(512, CONFIG_MMU_PAGE_SIZE))
1049+
#define KERNEL_ONLY_THREAD_STACK_SIZE (ROUND_UP(1024, CONFIG_MMU_PAGE_SIZE))
10501050
#else
1051-
#define KERNEL_ONLY_THREAD_STACK_SIZE (512)
1051+
#define KERNEL_ONLY_THREAD_STACK_SIZE (1024)
10521052
#endif
10531053

10541054
static K_KERNEL_THREAD_DEFINE(kernel_only_thread,

tests/lib/sprintf/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ CONFIG_FPU=y
44
CONFIG_TEST_USERSPACE=y
55
CONFIG_ZTEST_FATAL_HOOK=y
66
CONFIG_PICOLIBC_IO_FLOAT=y
7+
CONFIG_ZTEST_STACK_SIZE=2048

tests/lib/sprintf/prj_new.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ CONFIG_ZTEST_NEW_API=y
44
CONFIG_FPU=y
55
CONFIG_TEST_USERSPACE=y
66
CONFIG_ZTEST_FATAL_HOOK=y
7+
CONFIG_ZTEST_STACK_SIZE=2048

0 commit comments

Comments
 (0)