-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: make sure O_NOATIME is present only in Linux #6614
Conversation
As it is, the test checks if the return value is `undefined` in other platforms. But it should also make sure that the `O_NOATIME` should be found only in Linux.
assert(constants.hasOwnProperty('O_NOATIME')); | ||
assert.strictEqual(constants.O_NOATIME, 0x40000); | ||
} else { | ||
assert(false === constants.hasOwnProperty('O_NOATIME')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use !('O_NOATIME' in constants)
, it will check the prototype as well (for the very unlikely case that we decide to move things to the prototype in the future.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
LGTM with a suggestion. |
LGTM |
LGTM. CI is green. |
LGTM |
Landed in 4803d11. |
As it is, the test checks if the return value is `undefined` in other platforms. But it should also make sure that the `O_NOATIME` should be found only in Linux. PR-URL: #6614 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
As it is, the test checks if the return value is `undefined` in other platforms. But it should also make sure that the `O_NOATIME` should be found only in Linux. PR-URL: #6614 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
@thefourtheye lts? |
@thealphanerd This depends on #6492 which is a semver-minor one, so probably no for now. |
Checklist
Affected core subsystem(s)
test
Description of change
As it is, the test checks if the return value is
undefined
in otherplatforms. But it should also make sure that the
O_NOATIME
should befound only in Linux.
Ref: #6492
cc @Trott @bnoordhuis @jasnell
CI Run: https://ci.nodejs.org/job/node-test-pull-request/2522/