Skip to content

Commit 52d321d

Browse files
TrottMylesBorins
authored andcommitted
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: #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 a382932 commit 52d321d

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

test/common/index.js

Lines changed: 0 additions & 3 deletions
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) &&
@@ -754,7 +752,6 @@ module.exports = {
754752
isMainThread,
755753
isOpenBSD,
756754
isOSX,
757-
isOSXMojave,
758755
isSunOS,
759756
isWindows,
760757
localIPv6Hosts,

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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)