-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: Incorrect assumptions on the user uid and gid #19371
Comments
@gireeshpunathil Links to branches ( 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 |
@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:
Hope this helps! |
Thanks, I'll make a start and let you know if I run into any issues. |
Add a invalidArgTypeErrorCount variable to adjust the number of expected errors if the uid and gid options cannot be properly validated. Fixes: nodejs#19371
@gireeshpunathil Please review PR when free, thanks |
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
The text was updated successfully, but these errors were encountered: