Skip to content

Commit f0a31e5

Browse files
dmabuptrichardlau
authored andcommitted
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: #30714 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 3b484ed commit f0a31e5

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

test/common/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ Attempts to 'kill' `pid`
237237

238238
Platform check for Free BSD.
239239

240+
### isIBMi
241+
* [&lt;boolean>][]
242+
243+
Platform check for IBMi.
244+
240245
### isLinux
241246
* [&lt;boolean>][]
242247

test/common/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ if (process.argv.length === 2 &&
102102

103103
const isWindows = process.platform === 'win32';
104104
const isAIX = process.platform === 'aix';
105+
// On IBMi, process.platform and os.platform() both return 'aix',
106+
// It is not enough to differentiate between IBMi and real AIX system.
107+
const isIBMi = os.type() === 'OS400';
105108
const isLinuxPPCBE = (process.platform === 'linux') &&
106109
(process.arch === 'ppc64') &&
107110
(os.endianness() === 'BE');
@@ -762,6 +765,7 @@ module.exports = {
762765
isAIX,
763766
isAlive,
764767
isFreeBSD,
768+
isIBMi,
765769
isLinux,
766770
isLinuxPPCBE,
767771
isMainThread,

test/common/index.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const {
99
isMainThread,
1010
isWindows,
1111
isAIX,
12+
isIBMi,
1213
isLinuxPPCBE,
1314
isSunOS,
1415
isFreeBSD,
@@ -55,6 +56,7 @@ export {
5556
isMainThread,
5657
isWindows,
5758
isAIX,
59+
isIBMi,
5860
isLinuxPPCBE,
5961
isSunOS,
6062
isFreeBSD,

test/parallel/test-cluster-bind-privileged-port.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const common = require('../common');
2626
if (common.isOSX)
2727
common.skip('macOS may allow ordinary processes to use any port');
2828

29+
if (common.isIBMi)
30+
common.skip('IBMi may allow ordinary processes to use any port');
31+
2932
if (common.isWindows)
3033
common.skip('not reliable on Windows.');
3134

0 commit comments

Comments
 (0)