diff --git a/test/common/README.md b/test/common/README.md index ad4e5b7f5e1f6d..efb32a2cdde360 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 888a1feba37462..09b7f5577844cb 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 f747ee327913a5..9dafe9723c472c 100644 --- a/test/common/index.mjs +++ b/test/common/index.mjs @@ -10,6 +10,7 @@ const { isMainThread, isWindows, isAIX, + isIBMi, isLinuxPPCBE, isSunOS, isFreeBSD, @@ -56,6 +57,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 e95768a8fcc2b4..57aa4c735d480f 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.');