Skip to content
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: skip failing tests for osx mojave #23550

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const isOpenBSD = process.platform === 'openbsd';
const isLinux = process.platform === 'linux';
const isOSX = process.platform === 'darwin';

const isOSXMojave = isOSX && (os.release().startsWith('18'));

const enoughTestMem = os.totalmem() > 0x70000000; /* 1.75 Gb */
const cpus = os.cpus();
const enoughTestCpu = Array.isArray(cpus) &&
Expand Down Expand Up @@ -723,6 +725,7 @@ module.exports = {
isMainThread,
isOpenBSD,
isOSX,
isOSXMojave,
isSunOS,
isWindows,
isWOW64,
Expand Down
25 changes: 25 additions & 0 deletions test/known_issues/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';
const common = require('../common');

// This test should fail on macOS (10.14) due to an issue with privileged ports.

const assert = require('assert');
const cluster = require('cluster');
const net = require('net');

if (!common.isOSXMojave)
assert.fail('Code should fail only on macOS Mojave.');


if (cluster.isMaster) {
cluster.fork().on('exit', common.mustCall((exitCode) => {
assert.strictEqual(exitCode, 0);
}));
} else {
const s = net.createServer(common.mustNotCall());
s.listen(42, common.mustNotCall('listen should have failed'));
s.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'EACCES');
process.disconnect();
}));
}
5 changes: 5 additions & 0 deletions test/parallel/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

'use strict';
const common = require('../common');

// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
if (common.isOSXMojave)
common.skip('bypass test for Mojave due to OSX issue');

if (common.isWindows)
common.skip('not reliable on Windows.');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

'use strict';
const common = require('../common');

// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
if (common.isOSXMojave)
common.skip('bypass test for Mojave due to OSX issue');

if (common.isWindows)
common.skip('not reliable on Windows');

Expand Down