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

test: resolve process.setegid error for nobody on ubuntu #19757

Closed

Conversation

dsinecos
Copy link
Contributor

@dsinecos dsinecos commented Apr 2, 2018

When the tests are run as root in Ubuntu, process.setegid is called with
'nobody' as an argument. This throws an error in Ubuntu. This is because
in Ubuntu the equivalent of 'nobody' group is named as 'nogroup'.

This commit sets egid to 'nobody' first and if it throws a group id does not exist error, it attempts to set egid to 'nogroup'. If it still
causes an error, the error is thrown.

Refs: #19594

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

When the tests are run as root in Ubuntu, process.setegid is called with
'nobody' as an argument. This throws an error in Ubuntu. This is because
in Ubuntu the equivalent of 'nobody' group is named as 'nogroup'.

This commit sets egid to 'nobody' first and if it throws a `group id
does not exist` error, it attempts to set egid to 'nogroup'. If it still
causes an error, the error is thrown.

Refs: nodejs#19594
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 2, 2018
@Trott
Copy link
Member

Trott commented Apr 2, 2018

@Trott
Copy link
Member

Trott commented Apr 4, 2018

Failures on CI seem unrelated. Re-running:

node-test-commit-plinux: https://ci.nodejs.org/job/node-test-commit-plinux/16588/
node-test-commit-arm: https://ci.nodejs.org/job/node-test-commit-arm/15096/
node-test-commit-arm-fanned: https://ci.nodejs.org/job/node-test-commit-arm-fanned/152/

@Trott
Copy link
Member

Trott commented Apr 4, 2018

Re-re-running arm-fanned: https://ci.nodejs.org/job/node-test-commit-arm-fanned/173/

@lpinca
Copy link
Member

lpinca commented Apr 6, 2018

@lpinca
Copy link
Member

lpinca commented Apr 6, 2018

Landed in 4ae53af.

lpinca pushed a commit that referenced this pull request Apr 6, 2018
When the tests are run as root in Ubuntu, process.setegid is called with
'nobody' as an argument. This throws an error in Ubuntu. This is because
in Ubuntu the equivalent of 'nobody' group is named as 'nogroup'.

This commit sets egid to 'nobody' first and if it throws a `group id
does not exist` error, it attempts to set egid to 'nogroup'. If it still
causes an error, the error is thrown.

PR-URL: #19757
Refs: #19594
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@lpinca lpinca closed this Apr 6, 2018
addaleax pushed a commit that referenced this pull request Apr 6, 2018
When the tests are run as root in Ubuntu, process.setegid is called with
'nobody' as an argument. This throws an error in Ubuntu. This is because
in Ubuntu the equivalent of 'nobody' group is named as 'nogroup'.

This commit sets egid to 'nobody' first and if it throws a `group id
does not exist` error, it attempts to set egid to 'nogroup'. If it still
causes an error, the error is thrown.

PR-URL: #19757
Refs: #19594
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@addaleax
Copy link
Member

addaleax commented Apr 6, 2018

Re-landed in 3dc5404 due to #19854

targos pushed a commit that referenced this pull request Apr 12, 2018
When the tests are run as root in Ubuntu, process.setegid is called with
'nobody' as an argument. This throws an error in Ubuntu. This is because
in Ubuntu the equivalent of 'nobody' group is named as 'nogroup'.

This commit sets egid to 'nobody' first and if it throws a `group id
does not exist` error, it attempts to set egid to 'nogroup'. If it still
causes an error, the error is thrown.

PR-URL: #19757
Refs: #19594
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

8 participants