test: add an indicator `isIBMi` · nodejs/node@81d81a5 · GitHub
Skip to content

Commit 81d81a5

Browse files
dmabupttargos
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 <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>
1 parent 0aae502 commit 81d81a5

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

test/common/README.md

Lines changed: 5 additions & 0 deletions

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

0 commit comments

Comments
 (0)