Commit 1931f124 authored by Wayne Ren's avatar Wayne Ren Committed by Andrew Boie
Browse files

tests: fix arc related codes



code fixes for arc architecture

Signed-off-by: default avatarWayne Ren <wei.ren@synopsys.com>
parent adf6f48e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static volatile int crash_reason;
 * In both cases the thread is guaranteed never to run again once we
 * return from the _SysFatalErrorHandler().
 */
#if !(defined(CONFIG_ARM) || defined(CONFIG_XTENSA_ASM2))
#if !(defined(CONFIG_ARM) || defined(CONFIG_XTENSA_ASM2) || defined(CONFIG_ARC))
#define ERR_IS_NORETURN 1
#endif

+0 −1
Original line number Diff line number Diff line
@@ -4,6 +4,5 @@ tests:
    filter: CONFIG_ARCH_HAS_STACK_PROTECTION
    tags: core ignore_faults
  kernel.fatal.stack_sentinel:
    arch_exclude: arc
    extra_args: CONF_FILE=sentinel.conf
    tags: core ignore_faults
+2 −2
Original line number Diff line number Diff line
@@ -22,14 +22,14 @@
 * and immediately fires upon completing the exception path; the faulting
 * thread is never run again.
 */
#ifndef CONFIG_ARM
#if !(defined(CONFIG_ARM) || defined(CONFIG_ARC))
FUNC_NORETURN
#endif
void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
{
	INFO("Caught system error -- reason %d\n", reason);
	ztest_test_pass();
#ifndef CONFIG_ARM
#if !(defined(CONFIG_ARM) || defined(CONFIG_ARC))
	CODE_UNREACHABLE;
#endif
}
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static volatile unsigned int expected_reason;
 * and immediately fires upon completing the exception path; the faulting
 * thread is never run again.
 */
#ifndef CONFIG_ARM
#if !(defined(CONFIG_ARM) || defined(CONFIG_ARC))
FUNC_NORETURN
#endif
void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
@@ -79,7 +79,7 @@ void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
	} else {
		zassert_unreachable("Unexpected fault during test\n");
	}
#ifndef CONFIG_ARM
#if !(defined(CONFIG_ARM) || defined(CONFIG_ARC))
	CODE_UNREACHABLE;
#endif
}
+1 −1
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
	} else {
		ztest_test_fail();
	}
#ifndef CONFIG_ARM
#if !(defined(CONFIG_ARM) || defined(CONFIG_ARC))
	CODE_UNREACHABLE;
#endif