tests: kernel: sched: schedule_api: enlarge timeslice criterion

From time to time, measured slice time is one less/more than requested.
Fixes #35793

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2021-09-29 11:10:30 +02:00 committed by Anas Nashif
parent 0153b7dc50
commit 25432ecfa4

View file

@ -41,8 +41,8 @@ static void thread_tslice(void *p1, void *p2, void *p3)
int thread_parameter = (idx == (NUM_THREAD - 1)) ? '\n' :
(idx + 'A');
int64_t expected_slice_min = k_ticks_to_ms_floor64(k_ms_to_ticks_ceil32(SLICE_SIZE));
int64_t expected_slice_max = k_ticks_to_ms_floor64(k_ms_to_ticks_ceil32(SLICE_SIZE) + 1);
int64_t expected_slice_min = k_ticks_to_ms_floor64(k_ms_to_ticks_ceil32(SLICE_SIZE) - 1);
int64_t expected_slice_max = k_ticks_to_ms_ceil64(k_ms_to_ticks_ceil32(SLICE_SIZE) + 1);
/* Clumsy, but need to handle the precision loss with
* submillisecond ticks. It's always possible to alias and