Skip to content

Commit 22c9646

Browse files
wentongwunashif
authored andcommitted
tests: adjust stack size for mps2_an385's coverage test
for SDK 0.10.0, it consumes more stack size when coverage enabled, so adjust stack size to fix stack overflow issue. Fixes: #15206. Signed-off-by: Wentong Wu <[email protected]>
1 parent 3e255e9 commit 22c9646

File tree

8 files changed

+5
-10
lines changed

8 files changed

+5
-10
lines changed

boards/arm/mps2_an385/mps2_an385_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ CONFIG_TEST_EXTRA_STACKSIZE=4096
3939
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
4040
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE=4096
4141
CONFIG_ZTEST_STACKSIZE=4096
42+
CONFIG_ISR_STACK_SIZE=4096

tests/kernel/arm_irq_vector_table/prj.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
CONFIG_ZTEST=y
2-
CONFIG_ZTEST_STACKSIZE=512
3-
CONFIG_MAIN_STACK_SIZE=512
42
CONFIG_GEN_ISR_TABLES=n
53
CONFIG_NUM_IRQS=3
64
# Force Bluetooth disable (required by platforms that enable Bluetooth by default)

tests/kernel/fatal/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#if defined(CONFIG_X86) && defined(CONFIG_X86_MMU)
1515
#define STACKSIZE (8192)
1616
#else
17-
#define STACKSIZE (2048)
17+
#define STACKSIZE (2048 + CONFIG_TEST_EXTRA_STACKSIZE)
1818
#endif
1919
#define MAIN_PRIORITY 7
2020
#define PRIORITY 5
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
CONFIG_ZTEST=y
22
CONFIG_IRQ_OFFLOAD=y
3-
CONFIG_ISR_STACK_SIZE=512
43
CONFIG_HEAP_MEM_POOL_SIZE=128

tests/kernel/mem_protect/mem_protect/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ CONFIG_ZTEST=y
22
CONFIG_ZTEST_STACKSIZE=2048
33
CONFIG_MAX_THREAD_BYTES=4
44
CONFIG_USERSPACE=y
5-
CONFIG_PRIVILEGED_STACK_SIZE=1024

tests/kernel/mutex/sys_mutex/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#include <ztest.h>
5151
#include <misc/mutex.h>
5252

53-
#define STACKSIZE 512
53+
#define STACKSIZE (512 + CONFIG_TEST_EXTRA_STACKSIZE)
5454

5555
static ZTEST_DMEM int tc_rc = TC_PASS; /* test case return code */
5656

tests/kernel/profiling/profiling_api/prj.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ CONFIG_TEST_HW_STACK_PROTECTION=n
99
CONFIG_SYS_POWER_MANAGEMENT=y
1010
CONFIG_SYS_POWER_SLEEP_STATES=y
1111
CONFIG_SYS_PM_POLICY_APP=y
12-
CONFIG_IDLE_STACK_SIZE=768
1312

1413
# to check isr
1514
CONFIG_IRQ_OFFLOAD=y
16-
CONFIG_ISR_STACK_SIZE=768
1715

1816
CONFIG_SMP=n

tests/kernel/threads/thread_init/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
/*macro definition*/
1010
#define INIT_COOP_PRIO -2
11-
#define INIT_COOP_STACK_SIZE 500
11+
#define INIT_COOP_STACK_SIZE (500 + CONFIG_TEST_EXTRA_STACKSIZE)
1212
#define INIT_COOP_P1 ((void *)0xFFFF0000)
1313
#define INIT_COOP_P2 ((void *)0xCDEF)
1414
#define INIT_COOP_P3 ((void *)0x1234)
1515
#define INIT_COOP_OPTION (K_USER | K_INHERIT_PERMS)
1616
#define INIT_COOP_DELAY 2000
1717
#define INIT_PREEMPT_PRIO 1
18-
#define INIT_PREEMPT_STACK_SIZE 499
18+
#define INIT_PREEMPT_STACK_SIZE (499 + CONFIG_TEST_EXTRA_STACKSIZE)
1919
#define INIT_PREEMPT_P1 ((void *)5)
2020
#define INIT_PREEMPT_P2 ((void *)6)
2121
#define INIT_PREEMPT_P3 ((void *)7)

0 commit comments

Comments
 (0)