@@ -76,6 +76,7 @@ int issue_195_test(void);
76
76
int issue_1812_test (void );
77
77
int issue_1953_test (void );
78
78
int issue_2118_test (void );
79
+ int issue_2186_test (void );
79
80
80
81
int main () {
81
82
setup_default_uart ();
@@ -250,6 +251,8 @@ int main() {
250
251
251
252
issue_2118_test ();
252
253
254
+ issue_2186_test ();
255
+
253
256
PICOTEST_END_TEST ();
254
257
}
255
258
@@ -311,8 +314,8 @@ int issue_1953_test(void) {
311
314
repeating_timer_t timer1 ;
312
315
repeating_timer_t timer2 ;
313
316
314
- assert (add_repeating_timer_us (10 , timer_callback_issue_1953 , NULL , & timer1 ));
315
- assert (add_repeating_timer_us (100 , timer_callback_issue_1953 , NULL , & timer2 ));
317
+ hard_assert (add_repeating_timer_us (10 , timer_callback_issue_1953 , NULL , & timer1 ));
318
+ hard_assert (add_repeating_timer_us (100 , timer_callback_issue_1953 , NULL , & timer2 ));
316
319
317
320
int iterations = 0 ;
318
321
while (iterations < 100 ) {
@@ -364,3 +367,13 @@ int issue_2118_test(void) {
364
367
PICOTEST_END_SECTION ();
365
368
return 0 ;
366
369
}
370
+
371
+ int issue_2186_test (void ) {
372
+ PICOTEST_START_SECTION ("Issue #2186 defect - ta_wakes_up_on_or_before" );
373
+
374
+ hard_assert (best_effort_wfe_or_timeout (get_absolute_time () - 1 ));
375
+ hard_assert (best_effort_wfe_or_timeout (get_absolute_time () - 1 )); // this will lockup without the fix - wfe which never happens
376
+
377
+ PICOTEST_END_SECTION ();
378
+ return 0 ;
379
+ }
0 commit comments