Skip to content
Permalink
Browse files

tests: kernel: userspace: fix test skipping for ARC

This commit is a hotfix. It makes sanitycheck happy by fixing
the way we can temporarily exclude some tests in the userspace
test suite for the ARC architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and andrewboie committed Jul 30, 2019
1 parent 0294f82 commit 1b97691713e7f0b43cd2a62bd7eda3829322e71d
Showing with 20 additions and 2 deletions.
  1. +20 −2 tests/kernel/mem_protect/userspace/src/main.c
@@ -1127,27 +1127,47 @@ void test_object_recycle(void)

void test_oops_panic(void)
{
#if !defined(CONFIG_ARC)
test_oops(K_ERR_KERNEL_PANIC, K_ERR_KERNEL_OOPS);
#else
ztest_test_skip(); /* FIXME: #17590 */
#endif
}

void test_oops_oops(void)
{
#if !defined(CONFIG_ARC)
test_oops(K_ERR_KERNEL_OOPS, K_ERR_KERNEL_OOPS);
#else
ztest_test_skip(); /* FIXME: #17590 */
#endif
}

void test_oops_exception(void)
{
#if !defined(CONFIG_ARC)
test_oops(K_ERR_CPU_EXCEPTION, K_ERR_KERNEL_OOPS);
#else
ztest_test_skip(); /* FIXME: #17590 */
#endif
}

void test_oops_maxint(void)
{
#if !defined(CONFIG_ARC)
test_oops(INT_MAX, K_ERR_KERNEL_OOPS);
#else
ztest_test_skip(); /* FIXME: #17590 */
#endif
}

void test_oops_stackcheck(void)
{
#if !defined(CONFIG_ARC)
test_oops(K_ERR_STACK_CHK_FAIL, K_ERR_STACK_CHK_FAIL);
#else
ztest_test_skip(); /* FIXME: #17590 */
#endif
}

void test_main(void)
@@ -1202,13 +1222,11 @@ void test_main(void)
ztest_unit_test(test_stack_buffer),
ztest_user_unit_test(test_unimplemented_syscall),
ztest_user_unit_test(test_bad_syscall),
#if !defined(CONFIG_ARC) /* FIXME: #17590 */
ztest_user_unit_test(test_oops_panic),
ztest_user_unit_test(test_oops_oops),
ztest_user_unit_test(test_oops_exception),
ztest_user_unit_test(test_oops_maxint),
ztest_user_unit_test(test_oops_stackcheck),
#endif /* !defined(CONFIG_ARC) */
ztest_unit_test(test_object_recycle)
);
ztest_run_test_suite(userspace);

0 comments on commit 1b97691

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