Skip to content

Commit

Permalink
test: allow for absent nobody user in setuid test
Browse files Browse the repository at this point in the history
Some isolated build or test VMs don't have a "nobody" user, causing the
parallel/test-process-setuid-setgid test to fail. Add logic to allow for
that situation.

PR-URL: #13112
Fixes: #13071
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and jasnell committed May 23, 2017
1 parent 72429b3 commit 1af8b70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-process-setuid-setgid.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (process.getuid() !== 0) {

assert.throws(
() => { process.setuid('nobody'); },
/^Error: EPERM, /
/^Error: (EPERM, .+|setuid user id does not exist)$/
);
return;
}
Expand Down

0 comments on commit 1af8b70

Please sign in to comment.