Files
Krzysztof Chruściński 9d09993ce6 tests: kernel: timer: timer_api: Fix hanging for slow platforms
Test had forever loop that was attempting to read k_timer_remaining_ticks
while system tick did not change. If target has relatively fast system
clock then it might be impossible.

Tweak test to repeat few times and if k_timer_remaining_ticks is not
read in the known tick then range is used to validate correctness of
the returned value.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-12-02 11:31:41 +01:00
..

$ make run

[QEMU] CPU: qemu32
Running test suite test_timer_api
tc_start() - test_timer_duration_period
===================================================================
PASS - test_timer_duration_period.
tc_start() - test_timer_period_0
===================================================================
PASS - test_timer_period_0.
tc_start() - test_timer_expirefn_null
===================================================================
PASS - test_timer_expirefn_null.
tc_start() - test_timer_status_get
===================================================================
PASS - test_timer_status_get.
tc_start() - test_timer_status_get_anytime
===================================================================
PASS - test_timer_status_get_anytime.
tc_start() - test_timer_status_sync
===================================================================
PASS - test_timer_status_sync.
tc_start() - test_timer_k_define
===================================================================
PASS - test_timer_k_define.
===================================================================
PROJECT EXECUTION SUCCESSFUL