test: disable simple/test-process-getgroups on os x

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.
pull/24507/merge
Ben Noordhuis 2013-03-01 00:44:55 +01:00
parent d019bec72d
commit c53b921648
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,11 @@ var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var exec = require('child_process').exec; 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') { if (typeof process.getgroups === 'function') {
var groups = process.getgroups(); var groups = process.getgroups();
assert(Array.isArray(groups)); assert(Array.isArray(groups));