Lines Matching +full:use +full:- +full:case
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
25 How to use it in you app
52 You can choose to use one or both of them, depending on your needs.
53 If you use none of them, you can still define your own fatal or assert handler
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
70 - start a thread to test triggering an illegal instruction, then catch
72 - start a thread to test triggering a divide-by-zero error, then catch
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
92 test case, we do not recover it so far.
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
109 case type is 0
122 Caught system error -- reason 0 1
123 Fatal error expected as part of test case.
124 case type is 1
127 E: PTE: 0x12d000 -> 0x000000000012d000: RW US A D XD
136 Caught system error -- reason 0 1
137 Fatal error expected as part of test case.
138 case type is 2
148 Caught system error -- reason 0 1
149 Fatal error expected as part of test case.
150 case type is 3
159 Caught system error -- reason 3 1
160 Fatal error expected as part of test case.
161 case type is 4
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
190 Caught system error -- reason 3 1
191 Fatal error expected as part of test case.
192 PASS - test_catch_z_oops