zephyr/tests/kernel/timer/timer_api
Charles E. Youse 0ad4022e51 kernel/timeout: fix k_timer_remaining_get() when tickless
In some circumstances (e.g., a tickless kernel), k_timer_remaining_get()
would not account for time passed that didn't involve clock interrupts.
This adds a simple fix for that, and adds a test case.  In addition, the
return value of k_timer_remaining_get() is clamped at 0 in the case of
overdue timers and the API description is adjusted to reflect this.

Fixes: #13353

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-03-01 14:53:33 -08:00
..
src kernel/timeout: fix k_timer_remaining_get() when tickless 2019-03-01 14:53:33 -08:00
CMakeLists.txt cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
prj_tickless.conf
prj.conf tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
README doc: qemu target was deprecated, use 'run' 2017-08-03 11:48:55 -04:00
testcase.yaml kernel/timeout: fix k_timer_remaining_get() when tickless 2019-03-01 14:53:33 -08: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