Skip to content

Commit a30a652

Browse files
ananglmmahadevan108
authored andcommitted
tests: kernel: timer_behavior: Fix building on targets with small SRAM
In the default configuration of the test, with 10000 timer samples, the `periodic_data` array is too big to fit in SRAM on many targets. Use lower counts of samples for those, depending on their SRAM size, leaving at least 8 kB for other variables, buffers, stacks etc. Exclude the test for targets with less than 16 kB. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
1 parent 72637ac commit a30a652

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/kernel/timer/timer_behavior/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ source "Kconfig.zephyr"
77

88
config TIMER_TEST_SAMPLES
99
int "The number of timer samples to gather for statistics"
10+
default 1000 if (SRAM_SIZE < 24)
11+
default 2000 if (SRAM_SIZE < 32)
12+
default 3000 if (SRAM_SIZE < 48)
13+
default 5000 if (SRAM_SIZE < 64)
14+
default 7000 if (SRAM_SIZE < 96)
1015
default 10000
1116

1217
config TIMER_TEST_PERIOD

tests/kernel/timer/timer_behavior/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
tests:
22
kernel.timer.timer:
33
tags: kernel timer
4+
min_ram: 16
45
platform_type:
56
- mcu
67
# Really want to exclude renode not the physical boards, but no good

0 commit comments

Comments
 (0)