Skip to content

Commit ec3dc8c

Browse files
microbuilderstephanosio
authored andcommitted
tests: kernel: fatal: Catch EPSR reason code
Adds a check for `K_ERR_ARM_USAGE_ILLEGAL_EPSR` as the reason code when running this test for `CONFIG_ARMV7_M_ARMV8_M_MAINLINE`. Signed-off-by: Kevin Townsend <[email protected]>
1 parent 2017ed5 commit ec3dc8c

File tree

1 file changed

+4
-0
lines changed
  • tests/kernel/fatal/no-multithreading/src

1 file changed

+4
-0
lines changed

tests/kernel/fatal/no-multithreading/src/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
2929

3030
static void entry_cpu_exception(void)
3131
{
32+
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
33+
expected_reason = K_ERR_ARM_USAGE_ILLEGAL_EPSR;
34+
#else
3235
expected_reason = K_ERR_CPU_EXCEPTION;
36+
#endif
3337

3438
TC_PRINT("cpu exception\n");
3539
#if defined(CONFIG_X86)

0 commit comments

Comments
 (0)