tests: kernel: timer api with real time slot in test_sleep_abs

This patch is testing the test_sleep_abs with a longer
real time slot value. The reason is that for platforms
like stm32wb55rg with PM, the real time slot must be adjusted
because of the LPTIM ticker.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-08-27 09:57:13 +02:00 committed by Anas Nashif
parent f7c263ab42
commit 30db452aec

View File

@ -802,11 +802,11 @@ void test_sleep_abs(void)
/* Systems with very high tick rates and/or slow idle resume
* (I've seen this on intel_adsp) can occasionally take more
* than a tick to return from k_sleep(). Set a 100us real
* time slop.
* time slop or more depending on the time to resume
*/
k_ticks_t late = end - (start + sleep_ticks);
zassert_true(late >= 0 && late < k_us_to_ticks_ceil32(100),
zassert_true(late >= 0 && late < k_us_to_ticks_ceil32(250),
"expected wakeup at %lld, got %lld (late %lld)",
start + sleep_ticks, end, late);
}