From 8ca8280cc3d921d0c52fdcdac2e0daf346fc8601 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Wed, 1 Sep 2021 11:47:28 +0200 Subject: [PATCH] tests: lib: ringbuffer: Fix preempt_cnt not being reset Counter was not reset between various tests which may hide the fact that number of preemptions is less than expected. Signed-off-by: Krzysztof Chruscinski --- tests/lib/ringbuffer/src/concurrent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/lib/ringbuffer/src/concurrent.c b/tests/lib/ringbuffer/src/concurrent.c index 9f71533fcad..0ecd6064166 100644 --- a/tests/lib/ringbuffer/src/concurrent.c +++ b/tests/lib/ringbuffer/src/concurrent.c @@ -343,6 +343,7 @@ static void thread_entry_spsc(void *p1, void *p2, void *p3) NULL); k_timer_user_data_set(&timer, rbuf); + preempt_cnt = 0; consume_fn(rbuf, true); produce_fn(rbuf, true);