Skip to content
Commit afbc0443 authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

tests/kernel/thread_apis: Fix timing order



This test understood that it can't demand equality in timing because
of races against real time, so it simply validated that the test
started at or later than the expected timeout expiration.

But when calculating the expected time, it called k_uptime_ticks()
AFTER the timeout was registered.  So on systems with fast ticks (or
just bad luck) a tick expiring between the two steps will look like an
"early" expiration and fail the test.  Do things in the proper order.

Also, use the correct APIs for unit conversion and timeout
construction.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent dc6e880e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment