Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add an indicator isIBMi #30714

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ Attempts to 'kill' `pid`

Platform check for Free BSD.

### isIBMi
* [<boolean>][]

Platform check for IBMi.

### isLinux
* [<boolean>][]

Expand Down
4 changes: 4 additions & 0 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -762,6 +765,7 @@ module.exports = {
isAIX,
isAlive,
isFreeBSD,
isIBMi,
isLinux,
isLinuxPPCBE,
isMainThread,
Expand Down
2 changes: 2 additions & 0 deletions test/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const {
isMainThread,
isWindows,
isAIX,
isIBMi,
isLinuxPPCBE,
isSunOS,
isFreeBSD,
Expand Down Expand Up @@ -55,6 +56,7 @@ export {
isMainThread,
isWindows,
isAIX,
isIBMi,
isLinuxPPCBE,
isSunOS,
isFreeBSD,
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');

Expand Down