You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: Incorrect assumptions on the user uid and gid #19371
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 invalidArgTypeError that comes under these two sections separately.
Define 1 variabales, assign 62 to that
if not windows && process.getuid() === 0, reduce the count of invalidArgTypeError coming 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.
Activity
bnoordhuis commentedon Mar 19, 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.garwahl commentedon Mar 22, 2018
@gireeshpunathil How would I begin working on this? Could you elaborate on what needs to be done
gireeshpunathil commentedon Mar 22, 2018
@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:
invalidArgTypeErrorthat comes under these two sections separately.invalidArgTypeErrorcoming from that block, from the variable: 10Hope this helps!
garwahl commentedon Mar 22, 2018
Thanks, I'll make a start and let you know if I run into any issues.
test: fix incorrect assumptions on the user uid and gid
garwahl commentedon Mar 27, 2018
@gireeshpunathil Please review PR when free, thanks
test: fix incorrect assumptions on uid and gid