Commit 30db452a authored by Francois Ramu's avatar Francois Ramu Committed by Anas Nashif
Browse files

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: default avatarFrancois Ramu <francois.ramu@st.com>
parent f7c263ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}