Repository navigation
test: Incorrect assumptions on the user uid and gid #19371
Copy link
Copy link
Closed
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.
Description
Activity
- addedtestIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.
on Mar 15, 2018 @gireeshpunathil Links to branches (
master) aren't stable. Use links to tags or commits.Pro tip: if you go to https://github.com/nodejs/node/blob/master/test/parallel/test-child-process-spawnsync-validation-errors.js#L14 and press
y, it turns the URL into a commit link.Reacted by Gireesh Punathil- addedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on Mar 20, 2018 @gireeshpunathil How would I begin working on this? Could you elaborate on what needs to be done
@garwahl -
this line has the number of expected errors statically determined to be 62. This is based on the assumption of the condition at here and here will be true. When ran as root or ran in certain Containers, this may not be the case.
So:
- Count the # of
invalidArgTypeErrorthat comes under these two sections separately. - Define 1 variabales, assign 62 to that
- if not windows && process.getuid() === 0, reduce the count of
invalidArgTypeErrorcoming from that block, from the variable: 10 - if not windows && process.getgid() === 0, reduce the count further accordingly.
- apply the variable in place of 62.
- Add one liner comment against each of your changes so that someone does not stumble on the same issue in future.
- test in windows, non-windows, container & non-container environments if possible.
Hope this helps!
- Count the # of
Thanks, I'll make a start and let you know if I run into any issues.
Reacted by Gireesh Punathil- added a commit that references this issue
on Mar 23, 2018 @gireeshpunathil Please review PR when free, thanks
- added a commit that references this issue
on Jul 27, 2026
Metadata
Metadata
Assignees
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.
The count of expected errors here does not take into consideration of the conditionals here and is assumed to be always true.
This fails always if the user is root or sometimes in containers where process.getuid() and process.getgid() can be 0.
ref: nodejs/help#687