Skip to content

Commit 912c558

Browse files
committed
testsuite: allow disabling stack protection in usermode tests
This commit introduces a new Kconfig option in the testsuite sub-system, which allows us to disable HW stack protection from tests that run with user mode enabled. Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent b0b4597 commit 912c558

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

subsys/testsuite/Kconfig

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,21 @@ config TEST_ENABLE_USERSPACE
9292
case itself indicates that it exercises user mode via
9393
CONFIG_TEST_USERSPACE.
9494

95+
config TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION
96+
bool "Run User Mode tests without additionally enabling stack protection"
97+
depends on TEST_ENABLE_USERSPACE
98+
help
99+
A HW platform might not have sufficient MPU/MMU capabilities to support
100+
running all test cases with User Mode and HW Stack Protection features
101+
simultaneously enabled. For this platforms we execute the User Mode-
102+
related tests without enabling HW stack protection.
103+
95104
config TEST_HW_STACK_PROTECTION
96105
bool "Enable hardware-based stack overflow detection if available"
97106
depends on ARCH_HAS_STACK_PROTECTION
98107
depends on TEST
99108
select HW_STACK_PROTECTION
100-
default y
109+
default y if !TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION
101110
help
102111
This option will enable hardware-based stack protection by default
103112
for all test cases if the hardware supports it.

0 commit comments

Comments
 (0)