zephyr/tests/kernel/timer/timer_api
Krzysztof Chruściński 04e8d08e04 tests: kernel: timer: timer_api: Tweak test_timer_remaining
Test test_timer_remaining is comparing time captured by k_busy_wait and
k_timer_remaining_ticks. Test was accepting 1 tick difference between
those two. If system clock frequency is low (e.g. 100 Hz) 1 tick is a
long time but if system clock is high then 1 tick may not cover for
processing latency. Instead of using fixed 1 tick test is now converting
100 us to ticks (ceiling) to cover for cases where system clock is high.
100 us processing latency time is an arbitrary value.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-24 08:38:48 +01:00
..
src tests: kernel: timer: timer_api: Tweak test_timer_remaining 2025-01-24 08:38:48 +01:00
CMakeLists.txt
Kconfig
prj.conf
README
testcase.yaml

$ 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