Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
test: disable simple/test-process-getgroups on os x
Browse files Browse the repository at this point in the history
The output of `id -G` is unreliable on OS X. It uses an undocumented
Libsystem function called getgrouplist_2() that includes some auxiliary
groups that the POSIX getgroups() function does not return.

Or rather, not always. It leads to fun bug chases where the test fails
in one terminal but not in another.
  • Loading branch information
bnoordhuis committed Feb 28, 2013
1 parent d019bec commit c53b921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/simple/test-process-getgroups.js
Expand Up @@ -23,6 +23,11 @@ var common = require('../common');
var assert = require('assert');
var exec = require('child_process').exec;

if (process.platform === 'darwin') {
console.log('Skipping. Output of `id -G` is unreliable on Darwin.');
return;
}

if (typeof process.getgroups === 'function') {
var groups = process.getgroups();
assert(Array.isArray(groups));
Expand Down

0 comments on commit c53b921

Please sign in to comment.