tests: no need long busy_wait to waste cycles
* no need long busy_wait to waste cycles, especially in CI. Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
parent
ea072341d5
commit
315cba1c40
1 changed files with 2 additions and 2 deletions
|
@ -46,14 +46,14 @@ void test_prevent_interruption(void)
|
|||
* locked -- but since they are, check_lock_new isn't updated.
|
||||
*/
|
||||
k_timer_start(&irqlock_timer, K_MSEC(DURATION), K_NO_WAIT);
|
||||
k_busy_wait(MS_TO_US(1000));
|
||||
k_busy_wait(MS_TO_US(2 * DURATION));
|
||||
zassert_not_equal(handler_result, HANDLER_TOKEN,
|
||||
"timer interrupt was serviced while interrupts are locked");
|
||||
|
||||
printk("unlocking interrupts\n");
|
||||
irq_unlock(key);
|
||||
|
||||
k_busy_wait(MS_TO_US(1000));
|
||||
k_busy_wait(MS_TO_US(DURATION));
|
||||
|
||||
zassert_equal(handler_result, HANDLER_TOKEN,
|
||||
"timer should have fired");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue