Skip to content
Permalink
Browse files

tests: kernel: fatal: run test for ARMv8-M with MPU stack guards

HW stack protection in ARMv8-M is implemented by default
with the built-in stack guard mechanism. Therefore, by
default all tests for ARMv8-M will use the built-in stack
overflow mechanism (CONFIG_BUILTIN_STACK_GUARD is set in
tests). However, we would like have some coverage on the
MPU stack guard mechanism for ARMv8-M. The added test case
manually disables BUILTIN_STACK_GUARD and enables the
MPU_STACK_GUARD option, to provide that test coverage.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and andrewboie committed Jun 30, 2019
1 parent 9b03cd8 commit f3f3dc876823bd352964df5f686eed7ca916376e
Showing with 12 additions and 0 deletions.
  1. +7 −0 tests/kernel/fatal/prj_armv8m_mpu_stack_guard.conf
  2. +5 −0 tests/kernel/fatal/testcase.yaml
@@ -0,0 +1,7 @@
CONFIG_ZTEST=y
CONFIG_COVERAGE=n
CONFIG_TEST_USERSPACE=y
CONFIG_APPLICATION_DEFINED_SYSCALL=y
CONFIG_SMP=n
CONFIG_BUILTIN_STACK_GUARD=n
CONFIG_MPU_STACK_GUARD=y
@@ -12,6 +12,11 @@ tests:
extra_args: CONF_FILE=prj_arm_fp_sharing.conf
filter: CONFIG_ARCH_HAS_STACK_PROTECTION and CONFIG_ARMV7_M_ARMV8_M_FP
tags: kernel ignore_faults userspace
kernel.common.stack_protection_armv8m_mpu_stack_guard:
extra_args: CONF_FILE=prj_armv8m_mpu_stack_guard.conf
filter: CONFIG_ARM_MPU and CONFIG_ARMV8_M_MAINLINE
arch_whitelist: arm
tags: kernel ignore_faults userspace
kernel.common.stack_sentinel:
extra_args: CONF_FILE=sentinel.conf
tags: kernel ignore_faults

0 comments on commit f3f3dc8

Please sign in to comment.
You can’t perform that action at this time.