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>
This commit is contained in:
parent
3b484edce3
commit
f0a31e5eb9
@ -237,6 +237,11 @@ Attempts to 'kill' `pid`
|
||||
|
||||
Platform check for Free BSD.
|
||||
|
||||
### isIBMi
|
||||
* [<boolean>][]
|
||||
|
||||
Platform check for IBMi.
|
||||
|
||||
### isLinux
|
||||
* [<boolean>][]
|
||||
|
||||
|
@ -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,
|
||||
|
@ -9,6 +9,7 @@ const {
|
||||
isMainThread,
|
||||
isWindows,
|
||||
isAIX,
|
||||
isIBMi,
|
||||
isLinuxPPCBE,
|
||||
isSunOS,
|
||||
isFreeBSD,
|
||||
@ -55,6 +56,7 @@ export {
|
||||
isMainThread,
|
||||
isWindows,
|
||||
isAIX,
|
||||
isIBMi,
|
||||
isLinuxPPCBE,
|
||||
isSunOS,
|
||||
isFreeBSD,
|
||||
|
@ -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.');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user