Skip to content
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

failed test: parallel/test-fs-access.js #1031

Closed
jbergstroem opened this issue Mar 3, 2015 · 3 comments
Closed

failed test: parallel/test-fs-access.js #1031

jbergstroem opened this issue Mar 3, 2015 · 3 comments
Labels
test Issues and PRs related to the tests.

Comments

@jbergstroem
Copy link
Member

On a linux amd64 3.18.0 system running glibc 2.20, an error event isn't thrown when trying to open a readonly file with W_OK as root (obviously works as intended as a user):

=== release test-fs-access ===                    
Path: parallel/test-fs-access
assert.js:87
  throw new assert.AssertionError({
        ^
AssertionError: error should exist
    at /home/jbergstroem/iojs/test/parallel/test-fs-access.js:48:10
    at FSReqWrap.oncomplete (fs.js:77:15)
Command: out/Release/iojs /home/jbergstroem/iojs/test/parallel/test-fs-access.js
[00:00|% 100|+   0|-   1]: Done   

Stat:ing the file looks as it should (was esp. interested in mode):

{ dev: 2049,
  mode: 33060,
  nlink: 1,
  uid: 0,
  gid: 0,
  rdev: 0,
  blksize: 4096,
  ino: 253029,
  size: 0,
  blocks: 0,
  atime: Tue Mar 03 2015 11:33:55 GMT+1100 (AEDT),
  mtime: Tue Mar 03 2015 11:33:55 GMT+1100 (AEDT),
  ctime: Tue Mar 03 2015 11:33:55 GMT+1100 (AEDT),
  birthtime: Tue Mar 03 2015 11:33:55 GMT+1100 (AEDT) }

I'll first try to establish that it is in fact a newer glibc before doing anything else.

@cjihrig
Copy link
Contributor

cjihrig commented Mar 3, 2015

@jbergstroem you should check out the same test in joyent/node. I think we are interested in the relevant parts of nodejs/node-v0.x-archive@4823afc and nodejs/node-v0.x-archive@28d0cbb.

@jbergstroem
Copy link
Member Author

@cjihrig Yeah, I did something similar but the assumption that's made isn't entirely correct. On other platforms (I tested instance FreeBSD), running as root doesn't result in a test fail.

I'd like to know more about which platforms fail and pass before assuming we skip.

Edit: Actually, I suck. Didn't run my tests properly. I'll create a PR that skips the specific test if we're uid 0.

jbergstroem added a commit to jbergstroem/node that referenced this issue Mar 3, 2015
Superusers can open files with W_OK permission even though their
mode is set to 0444. Patch originally from nodejs/node-v0.x-archive@28d0cbbd.

Fixes nodejs#1031.

PR-Url: nodejs#1031
@brendanashworth brendanashworth added the test Issues and PRs related to the tests. label Mar 3, 2015
cjihrig pushed a commit that referenced this issue Mar 3, 2015
Superusers can open files with W_OK permission even though their
mode is set to 0444. This commit makes the test attempt to change
its uid to nobody on non-Windows platforms. Patch originally from
nodejs/node-v0.x-archive@28d0cbbd.

Fixes: #1031
PR-URL: #1037
Reviewed-By: Colin Ihrig <[email protected]>
@cjihrig
Copy link
Contributor

cjihrig commented Mar 3, 2015

Closed in fd3ea29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

3 participants