Skip to content

test: resolve process.setegid error for nobody on ubuntu

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: https://github.com/nodejs/node/issues/19594

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

Merge request reports

Loading