From 8f4c47a203e9ba60fc0efb5caa506d5f2b1f2a23 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Sun, 16 Jun 2019 12:03:44 +0200 Subject: [PATCH] tests: kernel: fatal: add explicit no user-mode test case We would like to test the HW stack protection feature in ARM builds with no user-mode support, i.e. CONFIG_USERSPACE=n. For that we add a new test-case in tests/kernel/fatal test suite. Signed-off-by: Ioannis Glaropoulos --- tests/kernel/fatal/protection_no_userspace.conf | 5 +++++ tests/kernel/fatal/testcase.yaml | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 tests/kernel/fatal/protection_no_userspace.conf diff --git a/tests/kernel/fatal/protection_no_userspace.conf b/tests/kernel/fatal/protection_no_userspace.conf new file mode 100644 index 0000000000000..b52e0a2ac295c --- /dev/null +++ b/tests/kernel/fatal/protection_no_userspace.conf @@ -0,0 +1,5 @@ +CONFIG_HW_STACK_PROTECTION=y +CONFIG_ZTEST=y +CONFIG_COVERAGE=n +CONFIG_TEST_USERSPACE=n +CONFIG_SMP=n diff --git a/tests/kernel/fatal/testcase.yaml b/tests/kernel/fatal/testcase.yaml index 78ad9c6ec25e8..a0a2b0e37c7c4 100644 --- a/tests/kernel/fatal/testcase.yaml +++ b/tests/kernel/fatal/testcase.yaml @@ -3,6 +3,11 @@ tests: extra_args: CONF_FILE=prj.conf filter: CONFIG_ARCH_HAS_STACK_PROTECTION tags: kernel ignore_faults userspace + kernel.common.stack_protection_no_userspace: + extra_args: CONF_FILE=protection_no_userspace.conf + filter: CONFIG_ARCH_HAS_STACK_PROTECTION + arch_whitelist: arm + tags: kernel ignore_faults memory_protection kernel.common.stack_sentinel: extra_args: CONF_FILE=sentinel.conf tags: kernel ignore_faults