-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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: add test cases for fsPromises #19064
Conversation
test/parallel/test-fs-promises.js
Outdated
@@ -35,6 +39,8 @@ const { | |||
} = fsPromises; | |||
|
|||
const tmpDir = tmpdir.path; | |||
const gid = process.getgid(); |
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.
These functions are not available on Windows.
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.
oops... I will fix it.
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.
Ok, I added !common.isWindows
.
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.
Approving given green CI (and the windows fix)
Add tests of lchmod, chown, fchown and lchown.
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.
LGTM, although some basic assertions that the function calls are actually working as intended would be nice.
landed in c05c73a |
Add tests of lchmod, chown, fchown and lchown. PR-URL: #19064 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Unfortunately, this appears to be flaky on Raspberry Pi in CI: https://ci.nodejs.org/job/node-test-binary-arm/13951/RUN_SUBSET=1,label=pi3-raspbian-jessie/console 18:17:41 not ok 79 parallel/test-fs-promises
18:17:41 ---
18:17:41 duration_ms: 1.23
18:17:41 severity: fail
18:17:41 stack: |-
18:17:41 (node:1568) ExperimentalWarning: The fs/promises API is experimental
18:17:41 /home/iojs/build/workspace/node-test-binary-arm/test/common/index.js:766
18:17:41 (err) => process.nextTick(() => { throw err; }));
18:17:41 ^
18:17:41
18:17:41 Error: EPERM: operation not permitted, chown '/home/iojs/build/workspace/node-test-binary-arm/test/.tmp.0/baz.js' Can we revert until it's sorted out? |
It looks like it failed in the CI run for this PR: https://ci.nodejs.org/job/node-test-binary-arm/13910/RUN_SUBSET=2,label=pi3-raspbian-jessie/console I think it may be failing 100%, not merely flaky/unreliable. |
This reverts commit c05c73a. The commit breaks Raspberry Pi CI. Refs: nodejs#19064 (comment)
PR to revert: #19101 If fixing it is simple/easy, then I'd be happy to see a fix land instead. One thing that might be relevant is that I think the Pi devices have their temp directories mounted over NFS. So that may be a cause of fs oddities not seen on other devices. Although it is strange that it's only showing up on one of the three Pi variants, so I'm not really sure what's going on (but also didn't look very close TBH). /cc @rvagg @nodejs/build |
Wow... I'm sorry for my commit and thank you for the revert PR Rich. I also will investigate the logs. |
No problem. These things tend to happen when CI is permanently red already. :-( Definitely have to get that fixed.... |
This reverts commit c05c73a. The commit breaks Raspberry Pi CI. PR-URL: nodejs#19101 Ref: nodejs#19064 (comment) Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BTW I am also seeing the same error on Windows 10 + VS2017 |
Ah, never mind, I am seeing errors from |
Yeah, that's it @Trott, can't chown on the nfs mount even for the same uid/gid. The problem I think is that the current config is I'm loath to try and figure it out right now cause once I start messing with NFS it's a big investment to follow it through to completion and I don't have such a large block of time atm. Could we just add a armv6 & armv7 exclusion in the tests for now for this? The idea behind expanding coverage to this functionality is good, it's just our infra getting in the way. |
@rvagg I think the ideal solution is to fix the test to accommodate this situation rather than alter the setup on the Raspberry Pi devices. I have to imagine existing |
Add tests of lchmod, chown, fchown and lchown. PR-URL: nodejs#19064 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This reverts commit c05c73a. The commit breaks Raspberry Pi CI. PR-URL: nodejs#19101 Ref: nodejs#19064 (comment) Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Add tests of lchmod, chown, fchown and lchown. These tests will increase the coverage of
fs/promises
: https://coverage.nodejs.org/coverage-3f78d3fcf8029a0a/root/fs/promises.js.html.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test