From 30db452aec00b5e7f6f1933ef99a9a3387730ee2 Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Fri, 27 Aug 2021 09:57:13 +0200 Subject: [PATCH] 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 --- tests/kernel/timer/timer_api/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/kernel/timer/timer_api/src/main.c b/tests/kernel/timer/timer_api/src/main.c index 27cc74f209..07c1812b8e 100644 --- a/tests/kernel/timer/timer_api/src/main.c +++ b/tests/kernel/timer/timer_api/src/main.c @@ -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); }