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:
Wayne Ren 2020-04-14 16:53:11 +08:00 committed by Andrew Boie
commit 315cba1c40

View file

@ -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");