Skip to content

gio/tests/g-file-info: don't assume million-in-one events don't happen

Ross Burton requested to merge rburton/glib:time into main

The modification time test creates a file, gets the modification time in seconds, then gets the modification time in microseconds and assumes that the difference between the two has to be above 0.

As rare as this may be, it can happen:

$ stat g-file-info-test-50A450 -c %y 2021-07-06 18:24:56.000000767 +0100

Change the test to simply assert that the difference not negative to handle this case.

Merge request reports