summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-01-22 19:27:14 -0800
committerRich Trott <rtrott@gmail.com>2019-01-24 20:17:02 -0800
commit399ef4f5369ea3e7a7edf5f8bb09e889e3715ba0 (patch)
tree1e61f91c3f5501068a3c7e3a12bca5a0b77aa4fa /test
parent7d27f0e9d0570696962c301c08080396829c487f (diff)
downloadandroid-node-v8-399ef4f5369ea3e7a7edf5f8bb09e889e3715ba0.tar.gz
android-node-v8-399ef4f5369ea3e7a7edf5f8bb09e889e3715ba0.tar.bz2
android-node-v8-399ef4f5369ea3e7a7edf5f8bb09e889e3715ba0.zip
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: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test')
-rw-r--r--test/common/index.js3
-rw-r--r--test/parallel/test-cluster-bind-privileged-port.js4
-rw-r--r--test/parallel/test-cluster-shared-handle-bind-privileged-port.js4
3 files changed, 4 insertions, 7 deletions
diff --git a/test/common/index.js b/test/common/index.js
index eb9d511cb3..eeaa5737db 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -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) &&
@@ -739,7 +737,6 @@ module.exports = {
isMainThread,
isOpenBSD,
isOSX,
- isOSXMojave,
isSunOS,
isWindows,
localIPv6Hosts,
diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js
index 9d155259c3..e95768a8fc 100644
--- a/test/parallel/test-cluster-bind-privileged-port.js
+++ b/test/parallel/test-cluster-bind-privileged-port.js
@@ -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.');
diff --git a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js
index 1edece30af..d8fae065fa 100644
--- a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js
+++ b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js
@@ -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');