Permalink
Browse files

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 <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
  • Loading branch information...
Trott authored and addaleax committed Jan 23, 2019
1 parent c93e5e1 commit 1905f8ef55c4ff96c49b37d4c74a08176ac70dad
@@ -99,8 +99,6 @@ 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) &&
@@ -750,7 +748,6 @@ module.exports = {
isMainThread,
isOpenBSD,
isOSX,
isOSXMojave,
isSunOS,
isWindows,
localIPv6Hosts,
@@ -23,8 +23,8 @@
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.isOSX)
common.skip('macOS may allow ordinary processes to use any port');

if (common.isWindows)
common.skip('not reliable on Windows.');
@@ -23,8 +23,8 @@
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.isOSX)
common.skip('macOS may allow ordinary processes to use any port');

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

0 comments on commit 1905f8e

Please sign in to comment.