Skip to content

Commit 5e09a3d

Browse files
dsinecosBethGriggs
authored andcommittedDec 4, 2018
test: test process.setuid for bad argument types
Test process.setuid with an object as an argument. An equivalent test exists for process.seteuid. PR-URL: #19703 Fixes: #19591 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 970164f commit 5e09a3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎test/parallel/test-process-setuid-setgid.js

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if (common.isWindows) {
3333
return;
3434
}
3535

36+
assert.throws(() => {
37+
process.setuid({});
38+
}, /^TypeError: setuid argument must be a number or a string$/);
39+
3640
assert.throws(() => {
3741
process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf');
3842
}, /^Error: setuid user id does not exist$/);

0 commit comments

Comments
 (0)
Please sign in to comment.