Skip to content

Instantly share code, notes, and snippets.

@return
Created June 1, 2019 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save return/f05dafca1aab7a16a3b6f6b5f4a7972f to your computer and use it in GitHub Desktop.
Save return/f05dafca1aab7a16a3b6f6b5f4a7972f to your computer and use it in GitHub Desktop.
libuv fs_utime / fs_futime implementation comparison.
MacOS
ok 1 - fs_utime
# Access time parameter: 400497753.000000
# Modification time parameter: 400497753.000000
# Path: test_file
# Calculated access time: 400497753.000000
# Calculated mod time: 400497753.000000
ok 1 - fs_futime
# Access time parameter: 400497753.000000
# Modification time parameter: 400497753.000000
# Path: test_file
# Calculated access time: 400497753.000000
# Calculated mod time: 400497753.000000
Linux
ok 1 - fs_utime
# Access time parameter: 400497753.000000
# Modification time parameter: 400497753.000000
# Path: test_file
# Calculated access time: 400497753.000000
# Calculated mod time: 400497753.000000
ok 1 - fs_futime
# Access time parameter: 400497753.000000
# Modification time parameter: 400497753.000000
# Path: test_file
# Calculated access time: 400497753.000000
# Calculated mod time: 400497753.000000
Haiku
not ok 104 - fs_utime
# exit code 5376
# Output from process `fs_utime`:
# Access time parameter: 400497753.000000
# Modification time parameter: 400497753.000000
# Path: test_file
# Calculated access time: 1559347965.842396 <----------- Incorrect access time, should be 400497753.000000
# Calculated mod time: 400497753.032244
# Assertion failed in test/test-fs.c on line 758: s->st_atim.tv_sec + (s->st_atim.tv_nsec / 1000000000.0) == atime
# Abort
not ok 74 - fs_futime
# exit code 5376
# Output from process `fs_futime`:
# Access time parameter: 400497753.000000
# Modification time parameter: 400497753.000000
# Path: test_file
# Calculated access time: 1559347964.403838 <----------- Incorrect access time, should be 400497753.000000
# Calculated mod time: 400497753.023331
# Assertion failed in test/test-fs.c on line 758: s->st_atim.tv_sec + (s->st_atim.tv_nsec / 1000000000.0) == atime
# Abort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment