Skip to content

Commit b2a7397

Browse files
ABOSTMcarlescufi
authored andcommitted
tests: drivers: counter: counter_basic_api: allow equality in assert
Since introduction of #24374 this test fails on STM32 boards. Due to 1Hz frequency of RTC used, the 'diff' could be 0. But then 'counter_us_to_ticks(dev, processing_limit_us)' is also 0. We should allow the equality in the assert. Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent 2f8167f commit b2a7397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/drivers/counter/counter_basic_api/src/test_counter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static void alarm_handler(struct device *dev, u8_t chan_id, u32_t counter,
276276
(counter + top - now) : (counter - now);
277277
}
278278

279-
zassert_true(diff < counter_us_to_ticks(dev, processing_limit_us),
279+
zassert_true(diff <= counter_us_to_ticks(dev, processing_limit_us),
280280
"Unexpected distance between reported alarm value(%u) "
281281
"and actual counter value (%u), top:%d (processing "
282282
"time limit (%d us) might be exceeded?",

0 commit comments

Comments
 (0)