Skip to content

Commit

Permalink
tests: ztest: fix testcase might fail when assertion fail in ISR
Browse files Browse the repository at this point in the history
Put the testcase test_catch_assert_in_isr() to execute last, to prevent
it affects other test cases. Because when we caught an assert failure
in the ISR handler, it cannot be guaranteed that all the current
program status would be recovered.

Fixes #34844.

Signed-off-by: Enjia Mai <[email protected]>
  • Loading branch information
Enjia Mai authored and ioannisg committed May 6, 2021
1 parent 2b864ed commit f5e3d89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ztest/error_hook/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ void test_main(void)
ztest_test_suite(error_hook_tests,
ztest_user_unit_test(test_catch_assert_fail),
ztest_user_unit_test(test_catch_fatal_error),
ztest_unit_test(test_catch_assert_in_isr),
ztest_unit_test(test_catch_z_oops)
ztest_unit_test(test_catch_z_oops),
ztest_unit_test(test_catch_assert_in_isr)
);
ztest_run_test_suite(error_hook_tests);
#else
Expand Down

0 comments on commit f5e3d89

Please sign in to comment.