tests: arch: common: add stack_unwind test

Added test for archs that support it. It triggers an exception
and verify that the fatal message has stack unwind info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
Yong Cong Sin 2024-04-02 17:02:20 +08:00 committed by Anas Nashif
commit b8b98c2c29
4 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,39 @@
common:
harness: console
ignore_faults: true
ignore_qemu_crash: true
tags: kernel
tests:
arch.common.stack_unwind.riscv:
arch_allow: riscv
integration_platforms:
- qemu_riscv32
- qemu_riscv64
harness_config:
type: multi_line
regex:
- "E: call trace:"
- "E: 0: fp: \\w+ ra: \\w+"
- "E: 1: fp: \\w+ ra: \\w+"
arch.common.stack_unwind.x86:
arch_allow: x86
extra_configs:
- CONFIG_NO_OPTIMIZATIONS=y
integration_platforms:
- qemu_x86
- qemu_x86_64
harness_config:
type: multi_line
regex:
- "E: call trace:"
- "E: (E|R)IP: \\w+"
arch.common.stack_unwind.arm:
arch_allow:
- arm64
integration_platforms:
- qemu_cortex_a53
harness_config:
type: multi_line
regex:
- "E: backtrace 0: fp: \\w+ lr: \\w+"
- "E: backtrace 1: fp: \\w+ lr: \\w+"