zephyr/tests/kernel/timer/timer_api
Andy Ross 00e2cce1fc tests/kernel/timer/timer_api: Fix static double-conversion goof
The test of the absolute timeout feature was a simple whitebox test
that inspected the generated ticks field of different constructors for
identity.  But it wasn't simple enough, because it was doing a
ticks->ms->ticks conversion (at compile time, sigh) on the input data,
which is obviously lossy on platforms where ticks are shorter than
milliseconds by non-integral factors.

Fix to do the conversion in just one direction.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-04-22 17:35:10 +02:00
..
src tests/kernel/timer/timer_api: Fix static double-conversion goof 2020-04-22 17:35:10 +02:00
CMakeLists.txt
README
prj.conf
prj_tickless.conf
testcase.yaml

README

$ 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