← index #18869PR #6823
Related · high · value 3.273
QUERY · ISSUE

tests: extmod/time_time_ns.py intermittent failure due to CI runner clock precision

openby andrewleechopened 2026-02-25updated 2026-02-25

The time_time_ns.py test makes assertions about time.time_ns() precision
that intermittently fail on shared CI runners. Observed in the float (1)
and longlong (1) jobs in a 20-run log window. Attributed to ~7 of 103
failed runs over 14 months.

On shared CI runners the wall clock can have insufficient precision or
the process can be descheduled between measurements, causing timing
assertions to return False instead of True.

This one might be addressable by increasing the tolerance in the test
rather than fixing underlying code.

PR #18861 now ignores this failure in CI.

See analysis: https://gist.github.com/andrewleech/5686ed5242e0948d8679c432579e002e

CANDIDATE · PULL REQUEST

tests/extmod/utime_time_ns.py: Relax bounds on time_ns measurement.

mergedby dpgeorgeopened 2021-02-01updated 2021-02-01
tests

Some devices have lower precision than 1ms for time_ns() (eg PYBv1.x has 3.9ms resolution of the RTC) so make the test more lenient for them.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied