Skip to content

Commit

Permalink
tests: drivers: counter: Relax timing requirement
Browse files Browse the repository at this point in the history
In short_relative_capable test it is possible that short alarm
setting is repeated few times and it is possible that alarm
does not expire shortely after setting. Increase the delay after
expiration is checked.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch authored and carlescufi committed Mar 20, 2023
1 parent 047ee8c commit 51f452b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/drivers/counter/counter_basic_api/src/test_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ static void test_short_relative_alarm_instance(const struct device *dev)
dev->name, err);

/* wait to ensure that tick+1 timeout will expire. */
k_busy_wait(3*tick_us);
k_busy_wait(10 * tick_us);

cnt = IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS) ?
alarm_cnt : k_sem_count_get(&alarm_cnt_sem);
Expand Down

0 comments on commit 51f452b

Please sign in to comment.