test: fix test-fs-access when uid is 0
authorJohan Bergström <bugs@bergstroem.nu>
Tue, 3 Mar 2015 05:29:03 +0000 (16:29 +1100)
committercjihrig <cjihrig@gmail.com>
Tue, 3 Mar 2015 15:17:03 +0000 (10:17 -0500)
commitfd3ea299027d197c00c60c0507ded2ce96e6986a
tree956459cbacb9bf11cd41006dab4f7af90e78336f
parent5abfa930b82d4875eb4f30ea6cc903b468e7138f
test: fix test-fs-access when uid is 0

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
https://github.com/joyent/node/commit/28d0cbbd.

Fixes: https://github.com/iojs/io.js/issues/1031
PR-URL: https://github.com/iojs/io.js/pull/1037
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
test/parallel/test-fs-access.js