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 <daniel.leung@intel.com>
83 lines
2.7 KiB
YAML
83 lines
2.7 KiB
YAML
common:
|
|
integration_platforms:
|
|
- qemu_x86
|
|
- qemu_x86_64
|
|
platform_allow:
|
|
# Representative platforms to make sure this builds without issues
|
|
# and the analyzer actually runs and outputs something.
|
|
- mps2/an385
|
|
- qemu_cortex_a53
|
|
- qemu_x86
|
|
- qemu_x86_64
|
|
- qemu_riscv32
|
|
- qemu_riscv64
|
|
- qemu_xtensa/dc233c/mmu
|
|
extra_configs:
|
|
- CONFIG_QEMU_ICOUNT=n
|
|
tags:
|
|
- debug
|
|
- thread_analyzer
|
|
tests:
|
|
debug.thread_analyzer.printk:
|
|
extra_configs:
|
|
- CONFIG_THREAD_ANALYZER_USE_PRINTK=y
|
|
harness: console
|
|
harness_config:
|
|
type: multi_line
|
|
regex:
|
|
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
debug.thread_analyzer.printk.userspace:
|
|
filter: CONFIG_ARCH_HAS_USERSPACE
|
|
extra_configs:
|
|
- CONFIG_THREAD_ANALYZER_USE_PRINTK=y
|
|
- CONFIG_USERSPACE=y
|
|
harness: console
|
|
harness_config:
|
|
type: multi_line
|
|
regex:
|
|
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
debug.thread_analyzer.printk.userspace.priv_stack:
|
|
filter: CONFIG_ARCH_HAS_USERSPACE
|
|
extra_configs:
|
|
- CONFIG_THREAD_ANALYZER_USE_PRINTK=y
|
|
- CONFIG_THREAD_ANALYZER_PRIV_STACK_USAGE=y
|
|
- CONFIG_USERSPACE=y
|
|
platform_exclude:
|
|
# These platforms do not yet have the necessary bits to determine
|
|
# usage of privileged stacks.
|
|
- mps2/an385
|
|
- qemu_cortex_a53
|
|
harness: console
|
|
harness_config:
|
|
type: multi_line
|
|
regex:
|
|
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
- "(.*)PRIV_STACK: unused [0-9]+ usage [0-9]+ / [0-9]+"
|
|
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
debug.thread_analyzer.log_backend:
|
|
extra_configs:
|
|
- CONFIG_THREAD_ANALYZER_USE_LOG=y
|
|
- CONFIG_LOG=y
|
|
- CONFIG_LOG_MODE_IMMEDIATE=y
|
|
harness: console
|
|
harness_config:
|
|
type: multi_line
|
|
regex:
|
|
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
debug.thread_analyzer.log_backend.userspace:
|
|
filter: CONFIG_ARCH_HAS_USERSPACE
|
|
extra_configs:
|
|
- CONFIG_USERSPACE=y
|
|
- CONFIG_THREAD_ANALYZER_USE_LOG=y
|
|
- CONFIG_LOG=y
|
|
- CONFIG_LOG_MODE_IMMEDIATE=y
|
|
harness: console
|
|
harness_config:
|
|
type: multi_line
|
|
regex:
|
|
- "(.*)0x([0-9a-fA-F]+)([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|
|
- "(.*)ISR0([ ]+) : STACK: unused [0-9]+ usage [0-9]+ / [0-9]+ (.*)"
|