Lines Matching +full:continue +full:- +full:on +full:- +full:error
1 Title: A common fatal error and assert fail handler
6 code writing for fatal and assert handler for error case testing. They can
13 When writing error testing case (or we call it negative test case), we might
14 have to write self-defined k_sys_fatal_handler or post_assert_handler to deal
15 with the errors we caught, in order to make the test continue. This means much
16 identical code would be written. So we try to move the error handler definition
20 And when error happens, we sometimes need a special action to make our testing
22 error happened. This is why we add a hook on it, in order to achieve that goal.
28 (a) Usage for dealing with fatal error:
52 You can choose to use one or both of them, depending on your needs.
60 This test verifies if the common fatal error and assert fail handler works.
61 If the expected error was caught, the test case will pass.
64 - To call a function then giving the condition to trigger the assert fail,
68 - start a thread to test triggering a null address dereferencing, then catch
69 the (expected) fatal error.
70 - start a thread to test triggering an illegal instruction, then catch
71 the (expected) fatal error.
72 - start a thread to test triggering a divide-by-zero error, then catch
73 the (expected) fatal error.
74 - start a thread to call k_oops() then catch the (expected) fatal error.
75 - start a thread to call k_panel() then catch the (expected) fatal error.
78 - start a thread to enter ISR context by calling irq_offload(), then trigger
82 - Pass illegal address by syscall, then inside the syscall handler, the
83 K_OOPS macro will trigger a fatal error that will get caught (as expected).
90 Trigger a fatal error in ISR context, that will cause problem due to
91 the interrupt stack is already abnormal when we want to continue other
95 ---------------------------------------------------------------------------
101 START - test_catch_assert_fail
105 Assert error expected as part of test case.
106 PASS - test_catch_assert_fail
108 START - test_catch_fatal_error
110 E: Page fault at address (nil) (error code 0x4)
120 E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
122 Caught system error -- reason 0 1
123 Fatal error expected as part of test case.
125 E: Page fault at address 0x12dfc4 (error code 0x15)
127 E: PTE: 0x12d000 -> 0x000000000012d000: RW US A D XD
134 E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
136 Caught system error -- reason 0 1
137 Fatal error expected as part of test case.
146 E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
148 Caught system error -- reason 0 1
149 Fatal error expected as part of test case.
157 E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
159 Caught system error -- reason 3 1
160 Fatal error expected as part of test case.
168 E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
170 Caught system error -- reason 3 1
171 Fatal error expected as part of test case.
172 PASS - test_catch_fatal_error
174 START - test_catch_assert_in_isr
178 Assert error expected as part of test case.
179 PASS - test_catch_assert_in_isr
181 START - test_catch_z_oops
188 E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
190 Caught system error -- reason 3 1
191 Fatal error expected as part of test case.
192 PASS - test_catch_z_oops