node
node copied to clipboard
test: add filesystem check to `test-fs-stat-date.mjs`
main
-based alternative to: https://github.com/nodejs/node/pull/44129
Skip the test if filesystem doesn't provide correct atime
or mtime
value from fs.stat()
.
CI: https://ci.nodejs.org/job/node-test-pull-request/45919/
CI: https://ci.nodejs.org/job/node-test-pull-request/45925/
CI: https://ci.nodejs.org/job/node-test-pull-request/45927/
CI: https://ci.nodejs.org/job/node-test-pull-request/45937/
CI: https://ci.nodejs.org/job/node-test-pull-request/45944/
CI: https://ci.nodejs.org/job/node-test-pull-request/45949/
Fast-track has been requested by @LiviaMedeiros. Please 👍 to approve.
Marking as https://github.com/nodejs/node/labels/fast-track in case if we need this in v16.17.0 before deadlines.
Landed in 86276d3e761f485e6ac9bccd3c2e32fd6a2a1478
@LiviaMedeiros I cherry-picked https://github.com/nodejs/node/pull/43714 and this commit to v16.x-staging but it doesn't seem to work as expected. See https://github.com/nodejs/node/pull/44542#issuecomment-1249141515 https://ci.nodejs.org/job/node-test-binary-arm-12+/15525/RUN_SUBSET=1,label=pi2-docker/testReport/junit/(root)/test/parallel_test_fs_stat_date/
According to https://github.com/nodejs/node/pull/44129#issuecomment-1207839394, this test platform uses NFS mounts. According to RFC 1813, Page 21, NFSv3 uses unsigned types for timestamps:
struct nfstime3 {
uint32 seconds;
uint32 nseconds;
};
While NFSv4 (RFC 7530, Page 21) uses signed:
struct nfstime4 {
int64_t seconds;
uint32_t nseconds;
};
This is my best guess on why could this happen.
Opened https://github.com/nodejs/node/pull/44707 against main
, let me know if backport PR would be more convenient.
@LiviaMedeiros I cherry-picked #43714 and this commit to v16.x-staging but it doesn't seem to work as expected. See #44542 (comment) https://ci.nodejs.org/job/node-test-binary-arm-12+/15525/RUN_SUBSET=1,label=pi2-docker/testReport/junit/(root)/test/parallel_test_fs_stat_date/
This is causing the CI to fail in the v16.x release branch. I will label this as dont-land-on-v16.x; feel free to remove it if needed