diff options
author | Xu Meng <mengxumx@cn.ibm.com> | 2019-11-29 02:28:49 -0600 |
---|---|---|
committer | Richard Lau <riclau@uk.ibm.com> | 2019-12-02 12:33:50 -0500 |
commit | f0a31e5eb9c8512ec1d2badc9c372e544a0922e4 (patch) | |
tree | e7250e154d597deeb99e4cce23977a65f5fd419b /test | |
parent | 3b484edce3736cbcba26be1eec512df5282ca5bf (diff) | |
download | android-node-v8-f0a31e5eb9c8512ec1d2badc9c372e544a0922e4.tar.gz android-node-v8-f0a31e5eb9c8512ec1d2badc9c372e544a0922e4.tar.bz2 android-node-v8-f0a31e5eb9c8512ec1d2badc9c372e544a0922e4.zip |
test: add an indicator `isIBMi`
We have to skip some test cases on IBM i.
On IBM i, process.platform and os.platform() both return aix,
It is not enough to differentiate between IBM i and real AIX system.
Also updated parallel/test-cluster-bind-privileged-port.js for test.
PR-URL: https://github.com/nodejs/node/pull/30714
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/common/README.md | 5 | ||||
-rw-r--r-- | test/common/index.js | 4 | ||||
-rw-r--r-- | test/common/index.mjs | 2 | ||||
-rw-r--r-- | test/parallel/test-cluster-bind-privileged-port.js | 3 |
4 files changed, 14 insertions, 0 deletions
diff --git a/test/common/README.md b/test/common/README.md index db32c48b40..5f8b6cb309 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -237,6 +237,11 @@ Attempts to 'kill' `pid` Platform check for Free BSD. +### isIBMi +* [<boolean>][] + +Platform check for IBMi. + ### isLinux * [<boolean>][] diff --git a/test/common/index.js b/test/common/index.js index 888a1feba3..09b7f55778 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -102,6 +102,9 @@ if (process.argv.length === 2 && const isWindows = process.platform === 'win32'; const isAIX = process.platform === 'aix'; +// On IBMi, process.platform and os.platform() both return 'aix', +// It is not enough to differentiate between IBMi and real AIX system. +const isIBMi = os.type() === 'OS400'; const isLinuxPPCBE = (process.platform === 'linux') && (process.arch === 'ppc64') && (os.endianness() === 'BE'); @@ -762,6 +765,7 @@ module.exports = { isAIX, isAlive, isFreeBSD, + isIBMi, isLinux, isLinuxPPCBE, isMainThread, diff --git a/test/common/index.mjs b/test/common/index.mjs index 5ad6ec3c11..54f6dc7f17 100644 --- a/test/common/index.mjs +++ b/test/common/index.mjs @@ -9,6 +9,7 @@ const { isMainThread, isWindows, isAIX, + isIBMi, isLinuxPPCBE, isSunOS, isFreeBSD, @@ -55,6 +56,7 @@ export { isMainThread, isWindows, isAIX, + isIBMi, isLinuxPPCBE, isSunOS, isFreeBSD, diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js index e95768a8fc..57aa4c735d 100644 --- a/test/parallel/test-cluster-bind-privileged-port.js +++ b/test/parallel/test-cluster-bind-privileged-port.js @@ -26,6 +26,9 @@ const common = require('../common'); if (common.isOSX) common.skip('macOS may allow ordinary processes to use any port'); +if (common.isIBMi) + common.skip('IBMi may allow ordinary processes to use any port'); + if (common.isWindows) common.skip('not reliable on Windows.'); |