It seems to be racy/flaky.
It uses a comparison on "seconds" granularity.
I was adding debug to check the values it fails on.
It was somewhat reproducible in the bileto ticket (again autopkgtest infrastructure).
Therefore I inserted some debug code and re-ran it there.
Our test environment is too fast (sometimes) and hence the flakyness:
checking chronyc output OK
DEBUG before 1585747433
DEBUG before 1585747433
checking system clock BAD
That is checked with "lt" and here the results are ==.
I'll need to discuss if there is a strict reason for these to be non-equal.
Otherwise the fix might be as easy as using "-le" instead
FYI Separated from bug 1867036
It seems to be racy/flaky.
It uses a comparison on "seconds" granularity.
I was adding debug to check the values it fails on.
It was somewhat reproducible in the bileto ticket (again autopkgtest infrastructure).
Therefore I inserted some debug code and re-ran it there.
Our test environment is too fast (sometimes) and hence the flakyness:
checking chronyc output OK
DEBUG before 1585747433
DEBUG before 1585747433
checking system clock BAD
That is checked with "lt" and here the results are ==.
I'll need to discuss if there is a strict reason for these to be non-equal.
Otherwise the fix might be as easy as using "-le" instead