Skip to content

Commit 373d22b

Browse files
committed
tests: riscv Add tests for unlocked PMP entries
Adds four new test cases to validate the PMP stack guard protection when `CONFIG_PMP_NO_LOCK` is enabled (i.e., when PMP entries are not globally locked). Signed-off-by: Firas Sammoura <[email protected]>
1 parent c701e16 commit 373d22b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/arch/riscv/pmp/isr-stack-guard/testcase.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,23 @@ tests:
2323
extra_args: EXTRA_CFLAGS=-DPMP_TEST_FUNC_IDX=1
2424
extra_configs:
2525
- CONFIG_MULTITHREADING=y
26+
arch.riscv.pmp.no-mt.isr-stack-guard.unlocked:
27+
extra_args: EXTRA_CFLAGS=-DPMP_TEST_FUNC_IDX=0
28+
extra_configs:
29+
- CONFIG_MULTITHREADING=n
30+
- CONFIG_PMP_NO_LOCK=y
31+
arch.riscv.pmp.no-mt.main-stack-guard.unlocked:
32+
extra_args: EXTRA_CFLAGS=-DPMP_TEST_FUNC_IDX=1
33+
extra_configs:
34+
- CONFIG_MULTITHREADING=n
35+
- CONFIG_PMP_NO_LOCK=y
36+
arch.riscv.pmp.mt.isr-stack-guard.unlocked:
37+
extra_args: EXTRA_CFLAGS=-DPMP_TEST_FUNC_IDX=0
38+
extra_configs:
39+
- CONFIG_MULTITHREADING=y
40+
- CONFIG_PMP_NO_LOCK=y
41+
arch.riscv.pmp.mt.main-stack-guard.unlocked:
42+
extra_args: EXTRA_CFLAGS=-DPMP_TEST_FUNC_IDX=1
43+
extra_configs:
44+
- CONFIG_MULTITHREADING=y
45+
- CONFIG_PMP_NO_LOCK=y

0 commit comments

Comments
 (0)