guybedford edited PR #7569:
Node.js mtime setting only works up to microsecond accuracy.
This updates the test to work at this level at minimum when the
FS_TIME_PRECISION
option is set.
We could make this a configurable test option, I just wasn't sure how to set up such a conditional build feature for the test program - suggestions welcome if not reducing overall accuracy is preferred.
alexcrichton submitted PR review:
Ok this looks reasonable to me, thanks!
I still don't fully understand why
fs_duration_to_precision
is required in these tests, and I'll write out here why, but in the meantime I'm going to approve this an queue it for merging since it's just my own curiousity.All the tests from what I can tell are taking a timestamp reported by the system and then modifying it by some multiple of the configured precision. Assuming that the system is only reporting timestamps with rounded precision already, this means that all timestamps in play should all be appropriately rounded, right? If that's the case that's why I don't understand why this function exists, although I understand that if arbitrary durations were added to timestamps it would be required.
guybedford updated PR #7569.
guybedford updated PR #7569.
alexcrichton merged PR #7569.
Last updated: Dec 23 2024 at 12:05 UTC