zephyr/tests/kernel/timer/timer_api
Keith Packard 5d6b43f684 tests/timer_api: Use correct 'abs' macro with correct type parameter
Subtracting with a uint64_t operand yields a uint64_t result, for which
the absolute value is not terribly interesting. Cast the operand to
int64_t.

Use llabs instead of abs as abs takes an int parameter and not an
int64_t. This appears to work even with the minimal C library.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-14 01:50:36 +09:00
..
src tests/timer_api: Use correct 'abs' macro with correct type parameter 2022-06-14 01:50:36 +09: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