| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works.
|
Windows might have a surprise on this, so running CI immediately: https://ci.nodejs.org/job/node-test-pull-request/2882/ |
Sorry, something went wrong.
|
|
||
| assert.throws(() => { | ||
| spawn('echo', ['fhqwhgads'], {gid: 0}); | ||
| }, /EPERM/, 'Setting GID should throw EPERM for unprivileged users.'); |
There was a problem hiding this comment.
I'm reasonably sure these are going to fail with ENOTSUP on Windows.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm reasonably sure these are going to fail with ENOTSUP on Windows.
Will add a check for common.isWindows and alter the expected error appropriately.
Sorry, something went wrong.
|
There is #7049 about spawning echo on Windows. It kind of applies to this PR. Once that landed, I was going to consolidate all the uses of echo in our tests to a common helper. |
Sorry, something went wrong.
Sorry, something went wrong.
|
CI is green. Anyone feel good enough about this to give a LGTM? @nodejs/testing |
Sorry, something went wrong.
|
@cjihrig OK to leave this one as is and wait for the common helper function? Since the command doesn't actually ever get run--spawn throws in this test--it doesn't actually affect the test results. |
Sorry, something went wrong.
|
Yea, LGTM |
Sorry, something went wrong.
|
|
||
| assert.throws(() => { | ||
| spawn('echo', ['fhqwhgads'], {gid: 0}); | ||
| }, expectedError, 'Setting GID should throw EPERM for unprivileged users.'); |
There was a problem hiding this comment.
Maybe changing the assert message depending if it's windows or not?
Sorry, something went wrong.
There was a problem hiding this comment.
I'd just leave out the message.
Sorry, something went wrong.
There was a problem hiding this comment.
+1 for omitting the message.
Sorry, something went wrong.
|
LGTM with one nit you can ignore. |
Sorry, something went wrong.
|
LGTM with a suggestion. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: nodejs#7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: #7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
|
@thealphanerd If it lands cleanly, yes. |
Sorry, something went wrong.
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: #7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: #7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: #7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: #7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Remove a disabled test in favor of one that expects an error. This validates (somewhat) that the underlying code is calling the correct system call for setting UID and GID. Unlike the formerly disabled test, it does not try to validate that the system UID/GID setting works. PR-URL: #7084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
test child_process
Description of change
Remove a disabled test in favor of one that expects an error.
This validates (somewhat) that the underlying code is calling the
correct system call for setting UID and GID. Unlike the formerly
disabled test, it does not try to validate that the system UID/GID
setting works.