When invoking k_sleep() with an absolute timeout, the return value is garbage.
retVal = k_sleep(K_TIMEOUT_ABS_TICKS(targetTicks));
endTicks = k_uptime_ticks();
In the end, targetTicks == endTicks (as expected), but retVal != 0 (should be 0).
See also: #32499
The problem is that z_tick_sleep() doesn't handle the case of absolute timeouts when computing expected_wakeup_ticks.
(Maybe z_add_timeout() should return ticks to avoid duplication?)