Skip to content

Commit 82d56e8

Browse files
dcpleungnashif
authored andcommitted
tests: thread_analyzer: test for privileged stacks usage
This adds the bits to test the displaying the usage of privileged stacks for user threads. Note that this only adds the printk part as this is to test the code path to fetch usage data rather than the display part. Also add qemu_xtensa/dc233c/mmu to platform allow list so the privileged stack code can be tested on that platform. This replaces mps2/an385 with qemu_x86 as an integration platform due to the privileged stack test. Since ARM does not currently support getting privileged stack info, test would result in twister error due to kconfig warnings. The board cannot be excluded since it's an integration platform. So for now, use qemu_x86 as an integration for 32-bit testing. Once ARM has proper support, we can go back to having mps2/an385 as an integration platform. Signed-off-by: Daniel Leung <[email protected]>
1 parent 96bb97a commit 82d56e8

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tests/subsys/debug/thread_analyzer/testcase.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
common:
22
integration_platforms:
3-
- mps2/an385
3+
- qemu_x86
44
- qemu_x86_64
55
platform_allow:
66
# Representative platforms to make sure this builds without issues
@@ -11,6 +11,7 @@ common:
1111
- qemu_x86_64
1212
- qemu_riscv32
1313
- qemu_riscv64
14+
- qemu_xtensa/dc233c/mmu
1415
extra_configs:
1516
- CONFIG_QEMU_ICOUNT=n
1617
tags:
@@ -37,6 +38,24 @@ tests:
3738
regex:
3839
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
3940
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
41+
debug.thread_analyzer.printk.userspace.priv_stack:
42+
filter: CONFIG_ARCH_HAS_USERSPACE
43+
extra_configs:
44+
- CONFIG_THREAD_ANALYZER_USE_PRINTK=y
45+
- CONFIG_THREAD_ANALYZER_PRIV_STACK_USAGE=y
46+
- CONFIG_USERSPACE=y
47+
platform_exclude:
48+
# These platforms do not yet have the necessary bits to determine
49+
# usage of privileged stacks.
50+
- mps2/an385
51+
- qemu_cortex_a53
52+
harness: console
53+
harness_config:
54+
type: multi_line
55+
regex:
56+
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
57+
- "(.*)PRIV_STACK: unused [0-9]+ usage [0-9]+ / [0-9]+"
58+
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
4059
debug.thread_analyzer.log_backend:
4160
extra_configs:
4261
- CONFIG_THREAD_ANALYZER_USE_LOG=y

0 commit comments

Comments
 (0)