FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fix test-fs-utimes on non-Y2K38 file systems by Trott · Pull Request #37707 · nodejs/node · GitHub

/ node Public

test: fix test-fs-utimes on non-Y2K38 file systems - #37707

Closed
Trott wants to merge 0 commit into
nodejs:masterfrom
Trott:fix-test-fs-utimes
Closed

test: fix test-fs-utimes on non-Y2K38 file systems#37707
Trott wants to merge 0 commit into
nodejs:masterfrom
Trott:fix-test-fs-utimes

Conversation

Trott commented Mar 11, 2021

Copy link
Copy Markdown
Member

Fixes: #36591

Trott requested review from mhdawson, richardlau and targos March 11, 2021 03:20
nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Mar 11, 2021

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Trott commented Mar 11, 2021

Copy link
Copy Markdown
Member Author

Still need to skip on SmartOS and possibly others. Putting into Draft until I get around to looking more closely.

Trott marked this pull request as draft March 11, 2021 16:57
Comment thread test/parallel/test-fs-utimes.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think skipping as was done before it better. The sets it to off by one, so allowing off by one is the same thing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The previous skipped platforms are a separate issue that I was optimistically hoping this change would fix. If we dont allow the max - 1 value, then we need to skip all Linux hosts.

I think the thing to do is restore the previous skipped platforms and allow max - 1.

Trott marked this pull request as ready for review March 13, 2021 16:44
Trott force-pushed the fix-test-fs-utimes branch from f64b2f5 to 9b7fe78 Compare March 13, 2021 16:44

Trott commented Mar 13, 2021

Copy link
Copy Markdown
Member Author

OK, this is ready for review.

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

Trott added the wip Issues and PRs that are still a work in progress. label Mar 16, 2021

Trott commented Mar 16, 2021

Copy link
Copy Markdown
Member Author

Labeling this wip pending resolution of #36591 (comment).

Trott force-pushed the fix-test-fs-utimes branch from fd75a40 to d6544ac Compare March 17, 2021 05:23

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Trott removed the wip Issues and PRs that are still a work in progress. label Mar 17, 2021

Trott commented Mar 17, 2021

Copy link
Copy Markdown
Member Author

I think this is now ready for review. @targos @richardlau @mhdawson

targos commented Mar 17, 2021

Copy link
Copy Markdown
Member

sorry, the skip is not working correctly with my system and the test fails as before.

targos commented Mar 17, 2021

Copy link
Copy Markdown
Member

If it can help:

$ touch -t 204001020304 /tmp/y2k32-test

$ date -r /tmp/y2k32-test "+%Y%m%d%H%M"
203801190414

Comment thread test/parallel/test-fs-utimes-y2K38.js Outdated

This comment has been minimized.

Comment thread test/parallel/test-fs-utimes-y2K38.js Outdated

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Comment thread test/parallel/test-fs-utimes-y2K38.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

(Non-blocking observation.)
FWIW I believe GNU date is available via the coreutils package from the AIX toolbox but we don't currently have that installed on our CI hosts.

It is correct that the native date command doesn't support the -r option: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/d_commands/date.html

targos Mar 17, 2021
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What about stat -c '%Y' ?

Edit: updated to %Y
On my machine, it returns 2147483647, wich corresponds to 2038-01-19T03:14:07.000Z

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

AIX doesn't natively have stat but does have istat: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/i_commands/istat.html

Like GNU date, the GNU version of stat looks to be available in the coreutils AIX toolbox package.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

On macOS:

stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]

If there's something that will work on AIX, we can have a separate AIX path to do the check. Ditto for Windows. But I think those can also be added at a later date.

This comment has been minimized.

Trott commented Mar 17, 2021

Copy link
Copy Markdown
Member Author

The IBM i check for Y2K38 support passed but the test failed when fs.utimesSync() threw with EINVAL. Since IBM i is not fully supported (yet?) and has lots of skipped tests, including the current version of this one, I'll go back to skipping-for-now in IBM i.

This comment has been minimized.

This comment has been minimized.

targos commented Mar 17, 2021

Copy link
Copy Markdown
Member

Current result on my machine:

$ node test/parallel/y2k38.js
1..0 # Skipped: File system appears to lack Y2k38 support (date failed)

Trott commented Mar 17, 2021
edited
Loading

Copy link
Copy Markdown
Member Author

Helps to push your changes before running the test....

IBM i test to confirm skip logic: https://ci.nodejs.org/job/node-test-commit-ibmi/298/

This comment has been minimized.

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

Trott added a commit to Trott/io.js that referenced this pull request Mar 18, 2021
Move Y2K38-specific parts of test-fs-utimes to test-fs-utimes-y2K38.js.
On non-Windows, check for Y2K38 support and skip if it is unsupported.

Fixes: nodejs#36591

PR-URL: nodejs#37707
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Trott force-pushed the fix-test-fs-utimes branch from 2ff6e74 to 8d2095e Compare March 18, 2021 04:48

Trott commented Mar 18, 2021

Copy link
Copy Markdown
Member Author

Landed in ab6c7dd

Trott closed this Mar 18, 2021
Trott force-pushed the fix-test-fs-utimes branch from 8d2095e to ab6c7dd Compare March 18, 2021 04:51
Trott deleted the fix-test-fs-utimes branch March 18, 2021 04:51

Copy link
Copy Markdown
Member

The IBM i check for Y2K38 support passed but the test failed when fs.utimesSync() threw with EINVAL. Since IBM i is not fully supported (yet?) and has lots of skipped tests, including the current version of this one, I'll go back to skipping-for-now in IBM i.

FWIW Just to follow this up... on IBM i process.platform === 'aix' (same as AIX), see

node/test/common/index.js

Lines 801 to 805 in d3417bb

// On IBMi, process.platform and os.platform() both return 'aix',
// It is not enough to differentiate between IBMi and real AIX system.
get isIBMi() {
return require('os').type() === 'OS400';
},

so common.isAIX is true and the check for Y2k38 support skipped. If I remove the check for common.isAIX, the Y2K38 support check fails (as expected) on IBM i.

ruyadorno pushed a commit that referenced this pull request Mar 20, 2021
Move Y2K38-specific parts of test-fs-utimes to test-fs-utimes-y2K38.js.
On non-Windows, check for Y2K38 support and skip if it is unsupported.

Fixes: #36591

PR-URL: #37707
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
jasnell pushed a commit that referenced this pull request Mar 22, 2021
On some platforms `date` may not support the `-r` option. Optimistically
allow the test to proceed in that case as the previous `touch` had
succeeded -- we were just not able to easily validate the file date.

PR-URL: #37825
Refs: #37707
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno pushed a commit that referenced this pull request Mar 24, 2021
On some platforms `date` may not support the `-r` option. Optimistically
allow the test to proceed in that case as the previous `touch` had
succeeded -- we were just not able to easily validate the file date.

PR-URL: #37825
Refs: #37707
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno mentioned this pull request Mar 30, 2021
targos pushed a commit that referenced this pull request May 1, 2021
Move Y2K38-specific parts of test-fs-utimes to test-fs-utimes-y2K38.js.
On non-Windows, check for Y2K38 support and skip if it is unsupported.

Fixes: #36591

PR-URL: #37707
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
targos pushed a commit that referenced this pull request May 1, 2021
On some platforms `date` may not support the `-r` option. Optimistically
allow the test to proceed in that case as the previous `touch` had
succeeded -- we were just not able to easily validate the file date.

PR-URL: #37825
Refs: #37707
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams mentioned this pull request May 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test-fs-utimes failing locally

5 participants


Back | FazBrowse Home | New Git URL