Skip to content

Commit 399ef4f

Browse files
committed
test: remove common.isOSXMojave
common.isOSXMojave was added because it was believed that there was a bug in macOS Mojave that allowed unprivileged users to bind to privileged ports. As it turns out, that was a feature not a bug. It is likely to be in all future versions of macOS. Remove isOSXMojave and skip appropriate tests based on isOSX. Refs: https://news.ycombinator.com/item?id=18302380 PR-URL: nodejs#25658 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
1 parent 7d27f0e commit 399ef4f

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

test/common/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ const isOpenBSD = process.platform === 'openbsd';
9999
const isLinux = process.platform === 'linux';
100100
const isOSX = process.platform === 'darwin';
101101

102-
const isOSXMojave = isOSX && (os.release().startsWith('18'));
103-
104102
const enoughTestMem = os.totalmem() > 0x70000000; /* 1.75 Gb */
105103
const cpus = os.cpus();
106104
const enoughTestCpu = Array.isArray(cpus) &&
@@ -739,7 +737,6 @@ module.exports = {
739737
isMainThread,
740738
isOpenBSD,
741739
isOSX,
742-
isOSXMojave,
743740
isSunOS,
744741
isWindows,
745742
localIPv6Hosts,

test/parallel/test-cluster-bind-privileged-port.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
const common = require('../common');
2424

2525
// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
26-
if (common.isOSXMojave)
27-
common.skip('bypass test for Mojave due to OSX issue');
26+
if (common.isOSX)
27+
common.skip('macOS may allow ordinary processes to use any port');
2828

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

test/parallel/test-cluster-shared-handle-bind-privileged-port.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
const common = require('../common');
2424

2525
// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
26-
if (common.isOSXMojave)
27-
common.skip('bypass test for Mojave due to OSX issue');
26+
if (common.isOSX)
27+
common.skip('macOS may allow ordinary processes to use any port');
2828

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

0 commit comments

Comments
 (0)