node icon indicating copy to clipboard operation
node copied to clipboard

test: add filesystem check to `test-fs-stat-date.mjs`

Open LiviaMedeiros opened this issue 1 year ago • 8 comments

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().

LiviaMedeiros avatar Aug 08 '22 12:08 LiviaMedeiros

CI: https://ci.nodejs.org/job/node-test-pull-request/45919/

nodejs-github-bot avatar Aug 08 '22 12:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45925/

nodejs-github-bot avatar Aug 08 '22 15:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45927/

nodejs-github-bot avatar Aug 08 '22 16:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45937/

nodejs-github-bot avatar Aug 08 '22 19:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45944/

nodejs-github-bot avatar Aug 09 '22 11:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/45949/

nodejs-github-bot avatar Aug 09 '22 14:08 nodejs-github-bot

Fast-track has been requested by @LiviaMedeiros. Please 👍 to approve.

github-actions[bot] avatar Aug 09 '22 19:08 github-actions[bot]

Marking as https://github.com/nodejs/node/labels/fast-track in case if we need this in v16.17.0 before deadlines.

LiviaMedeiros avatar Aug 09 '22 19:08 LiviaMedeiros

Landed in 86276d3e761f485e6ac9bccd3c2e32fd6a2a1478

nodejs-github-bot avatar Aug 14 '22 11:08 nodejs-github-bot

@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/

targos avatar Sep 16 '22 13:09 targos

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 avatar Sep 18 '22 09:09 LiviaMedeiros

@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

juanarbol avatar Oct 11 '22 04:10 juanarbol