Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjn99 <jimnord99@yahoo.com>2018-10-12 20:36:32 +0300
committerMyles Borins <mylesborins@google.com>2018-11-29 19:39:04 +0300
commit3bc7b5efd281911176e0f143345c42de6fe86721 (patch)
treeb1820c998c4288e1fb978b20a621bdcb3cbcc0ea /test
parent75082ee15b654f7d7f4edbbf0b396c124644136a (diff)
test: skip failing tests for osx mojave
Refs: https://github.com/nodejs/node/issues/21679 PR-URL: https://github.com/nodejs/node/pull/23550 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/common/index.js3
-rw-r--r--test/known_issues/test-cluster-bind-privileged-port.js25
-rw-r--r--test/parallel/test-cluster-bind-privileged-port.js5
-rw-r--r--test/parallel/test-cluster-shared-handle-bind-privileged-port.js5
4 files changed, 38 insertions, 0 deletions
diff --git a/test/common/index.js b/test/common/index.js
index 4930f6163e8..71759bae142 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -57,6 +57,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) &&
@@ -711,6 +713,7 @@ module.exports = {
isMainThread,
isOpenBSD,
isOSX,
+ isOSXMojave,
isSunOS,
isWindows,
localIPv6Hosts,
diff --git a/test/known_issues/test-cluster-bind-privileged-port.js b/test/known_issues/test-cluster-bind-privileged-port.js
new file mode 100644
index 00000000000..6ada04aa030
--- /dev/null
+++ b/test/known_issues/test-cluster-bind-privileged-port.js
@@ -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();
+ }));
+}
diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js
index 99f7a20c494..9d155259c37 100644
--- a/test/parallel/test-cluster-bind-privileged-port.js
+++ b/test/parallel/test-cluster-bind-privileged-port.js
@@ -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.');
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 8f05b28fed3..1edece30af6 100644
--- a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js
+++ b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js
@@ -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');