diff --git a/deps/openssl/openssl-cl_asm.gypi b/deps/openssl/openssl-cl_asm.gypi index 8791e005bf0f41..cd10355c171228 100644 --- a/deps/openssl/openssl-cl_asm.gypi +++ b/deps/openssl/openssl-cl_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm/openssl-cl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm/openssl-cl.gypi'], diff --git a/deps/openssl/openssl-cl_asm_avx2.gypi b/deps/openssl/openssl-cl_asm_avx2.gypi index 815598676770c6..50b5a9c375bd8d 100644 --- a/deps/openssl/openssl-cl_asm_avx2.gypi +++ b/deps/openssl/openssl-cl_asm_avx2.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm_avx2/openssl-cl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl-cl.gypi'], diff --git a/deps/openssl/openssl-cl_no_asm.gypi b/deps/openssl/openssl-cl_no_asm.gypi index 22bcf1c3c77d84..0964fb36739b3a 100644 --- a/deps/openssl/openssl-cl_no_asm.gypi +++ b/deps/openssl/openssl-cl_no_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/no-asm/openssl-cl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/no-asm/openssl-cl.gypi'], diff --git a/deps/openssl/openssl-fips_asm.gypi b/deps/openssl/openssl-fips_asm.gypi index d0717df2a5094f..631df9eb893288 100644 --- a/deps/openssl/openssl-fips_asm.gypi +++ b/deps/openssl/openssl-fips_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm/openssl-fips.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm/openssl-fips.gypi'], diff --git a/deps/openssl/openssl-fips_asm_avx2.gypi b/deps/openssl/openssl-fips_asm_avx2.gypi index d2a2a4bc11413f..4d63cacf29d040 100644 --- a/deps/openssl/openssl-fips_asm_avx2.gypi +++ b/deps/openssl/openssl-fips_asm_avx2.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm_avx2/openssl-fips.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl-fips.gypi'], diff --git a/deps/openssl/openssl-fips_no_asm.gypi b/deps/openssl/openssl-fips_no_asm.gypi index d598bde68c783d..7fdfd772abbce8 100644 --- a/deps/openssl/openssl-fips_no_asm.gypi +++ b/deps/openssl/openssl-fips_no_asm.gypi @@ -1,7 +1,7 @@ { 'defines': ['OPENSSL_NO_ASM'], 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/no-asm/openssl-fips.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/no-asm/openssl-fips.gypi'], diff --git a/deps/openssl/openssl_asm.gypi b/deps/openssl/openssl_asm.gypi index dbd5a5f69ff8d9..dd7e636eb08893 100644 --- a/deps/openssl/openssl_asm.gypi +++ b/deps/openssl/openssl_asm.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm/openssl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm/openssl.gypi'], diff --git a/deps/openssl/openssl_asm_avx2.gypi b/deps/openssl/openssl_asm_avx2.gypi index 2883f83d694394..6a9c56d76a211a 100644 --- a/deps/openssl/openssl_asm_avx2.gypi +++ b/deps/openssl/openssl_asm_avx2.gypi @@ -1,6 +1,6 @@ { 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/asm_avx2/openssl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl.gypi'], diff --git a/deps/openssl/openssl_common.gypi b/deps/openssl/openssl_common.gypi index 256eb7d1808db3..1290fff251fc5b 100644 --- a/deps/openssl/openssl_common.gypi +++ b/deps/openssl/openssl_common.gypi @@ -13,7 +13,7 @@ ], # build options specific to OS 'conditions': [ - [ 'OS=="aix"', { + [ 'OS in ("aix", "os400")', { # AIX is missing /usr/include/endian.h 'defines': [ '__LITTLE_ENDIAN=1234', diff --git a/deps/openssl/openssl_no_asm.gypi b/deps/openssl/openssl_no_asm.gypi index de0e486f67e90e..20663decabba23 100644 --- a/deps/openssl/openssl_no_asm.gypi +++ b/deps/openssl/openssl_no_asm.gypi @@ -1,7 +1,7 @@ { 'defines': ['OPENSSL_NO_ASM'], 'conditions': [ - ['target_arch=="ppc64" and OS=="aix"', { + ['target_arch=="ppc64" and OS in ("aix", "os400")', { 'includes': ['config/archs/aix64-gcc-as/no-asm/openssl.gypi'], }, 'target_arch=="ppc64" and OS=="linux" and node_byteorder =="little"', { 'includes': ['config/archs/linux-ppc64le/no-asm/openssl.gypi'], diff --git a/test/abort/test-addon-uv-handle-leak.js b/test/abort/test-addon-uv-handle-leak.js index e494b12f2de558..d2c4f8e646f457 100644 --- a/test/abort/test-addon-uv-handle-leak.js +++ b/test/abort/test-addon-uv-handle-leak.js @@ -78,6 +78,7 @@ if (process.argv[2] === 'child') { if (!(common.isFreeBSD || common.isAIX || + common.isIBMi || (common.isLinux && !isGlibc()) || common.isWindows)) { assert(stderr.includes('ExampleOwnerClass'), stderr); diff --git a/test/common/index.js b/test/common/index.js index 338e773a353eff..dfce909f95cd13 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -123,7 +123,6 @@ if (process.argv.length === 2 && } const isWindows = process.platform === 'win32'; -const isAIX = process.platform === 'aix'; const isSunOS = process.platform === 'sunos'; const isFreeBSD = process.platform === 'freebsd'; const isOpenBSD = process.platform === 'openbsd'; @@ -274,7 +273,7 @@ function platformTimeout(ms) { if (process.features.debug) ms = multipliers.two * ms; - if (isAIX) + if (exports.isAIX || exports.isIBMi) return multipliers.two * ms; // Default localhost speed is slower on AIX if (isPi) @@ -925,7 +924,6 @@ const common = { hasQuic, hasMultiLocalhost, invalidArgTypeHelper, - isAIX, isAlive, isAsan, isDumbTerminal, @@ -996,7 +994,12 @@ const common = { }, // On IBMi, process.platform and os.platform() both return 'aix', + // when built with Python versions earlier than 3.9. // It is not enough to differentiate between IBMi and real AIX system. + get isAIX() { + return require('os').type() === 'AIX'; + }, + get isIBMi() { return require('os').type() === 'OS400'; }, diff --git a/test/known_issues/test-cwd-enoent-file.js b/test/known_issues/test-cwd-enoent-file.js index 0f75896134f7e3..6d99987895baf4 100644 --- a/test/known_issues/test-cwd-enoent-file.js +++ b/test/known_issues/test-cwd-enoent-file.js @@ -5,7 +5,7 @@ const common = require('../common'); const assert = require('assert'); -if (common.isSunOS || common.isWindows || common.isAIX) { +if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi) { // The current working directory cannot be removed on these platforms. // Change this to common.skip() when this is no longer a known issue test. assert.fail('cannot rmdir current working directory'); diff --git a/test/parallel/test-cwd-enoent-preload.js b/test/parallel/test-cwd-enoent-preload.js index 2077d9c1478335..21b20d6d035672 100644 --- a/test/parallel/test-cwd-enoent-preload.js +++ b/test/parallel/test-cwd-enoent-preload.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. -if (common.isSunOS || common.isWindows || common.isAIX) +if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi) common.skip('cannot rmdir current working directory'); if (!common.isMainThread) common.skip('process.chdir is not available in Workers'); diff --git a/test/parallel/test-cwd-enoent-repl.js b/test/parallel/test-cwd-enoent-repl.js index 5ea8abc7e42b52..0a61cbfbced9b4 100644 --- a/test/parallel/test-cwd-enoent-repl.js +++ b/test/parallel/test-cwd-enoent-repl.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. -if (common.isSunOS || common.isWindows || common.isAIX) +if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi) common.skip('cannot rmdir current working directory'); if (!common.isMainThread) common.skip('process.chdir is not available in Workers'); diff --git a/test/parallel/test-cwd-enoent.js b/test/parallel/test-cwd-enoent.js index 8beb1e3fbe0a05..876888bc2be518 100644 --- a/test/parallel/test-cwd-enoent.js +++ b/test/parallel/test-cwd-enoent.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. -if (common.isSunOS || common.isWindows || common.isAIX) +if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi) common.skip('cannot rmdir current working directory'); if (!common.isMainThread) common.skip('process.chdir is not available in Workers'); diff --git a/test/parallel/test-fs-readfile-pipe-large.js b/test/parallel/test-fs-readfile-pipe-large.js index 1a685ebc612b85..4376774bb411d6 100644 --- a/test/parallel/test-fs-readfile-pipe-large.js +++ b/test/parallel/test-fs-readfile-pipe-large.js @@ -3,7 +3,7 @@ const common = require('../common'); // Simulate `cat readfile.js | node readfile.js` -if (common.isWindows || common.isAIX) +if (common.isWindows || common.isAIX || common.isIBMi) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-pipe.js b/test/parallel/test-fs-readfile-pipe.js index 0cffbd0f5aa162..79d5699fef64a4 100644 --- a/test/parallel/test-fs-readfile-pipe.js +++ b/test/parallel/test-fs-readfile-pipe.js @@ -24,7 +24,7 @@ const common = require('../common'); // Simulate `cat readfile.js | node readfile.js` -if (common.isWindows || common.isAIX) +if (common.isWindows || common.isAIX || common.isIBMi) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfilesync-pipe-large.js b/test/parallel/test-fs-readfilesync-pipe-large.js index 2cb857a329fbee..5450337c4f680a 100644 --- a/test/parallel/test-fs-readfilesync-pipe-large.js +++ b/test/parallel/test-fs-readfilesync-pipe-large.js @@ -3,7 +3,7 @@ const common = require('../common'); // Simulate `cat readfile.js | node readfile.js` -if (common.isWindows || common.isAIX) +if (common.isWindows || common.isAIX || common.isIBMi) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-realpath-pipe.js b/test/parallel/test-fs-realpath-pipe.js index 29fe1d3b7d28e1..f637642ca21d67 100644 --- a/test/parallel/test-fs-realpath-pipe.js +++ b/test/parallel/test-fs-realpath-pipe.js @@ -2,7 +2,7 @@ const common = require('../common'); -if (common.isWindows || common.isAIX) +if (common.isWindows || common.isAIX || common.isIBMi) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index 8f8286f8a3343f..e6ae75d4e33a5f 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -39,7 +39,7 @@ function stat_resource(resource, statSync = fs.statSync) { const stats = fs.fstatSync(resource); // Ensure mtime has been written to disk // except for directories on AIX where it cannot be synced - if (common.isAIX && stats.isDirectory()) + if ((common.isAIX || common.isIBMi) && stats.isDirectory()) return stats; fs.fsyncSync(resource); return fs.fstatSync(resource); diff --git a/test/parallel/test-os.js b/test/parallel/test-os.js index d82f2ece3159a6..f7059260ce507e 100644 --- a/test/parallel/test-os.js +++ b/test/parallel/test-os.js @@ -81,11 +81,14 @@ const hostname = os.hostname(); is.string(hostname); assert.ok(hostname.length > 0); -const DUMMY_PRIORITY = 10; -os.setPriority(DUMMY_PRIORITY); -const priority = os.getPriority(); -is.number(priority); -assert.strictEqual(priority, DUMMY_PRIORITY); +// IBMi process priority is different. +if (!common.isIBMi) { + const DUMMY_PRIORITY = 10; + os.setPriority(DUMMY_PRIORITY); + const priority = os.getPriority(); + is.number(priority); + assert.strictEqual(priority, DUMMY_PRIORITY); +} // On IBMi, os.uptime() returns 'undefined' if (!common.isIBMi) { diff --git a/test/parallel/test-process-dlopen-error-message-crash.js b/test/parallel/test-process-dlopen-error-message-crash.js index d678021764e8f4..de8b3033195a46 100644 --- a/test/parallel/test-process-dlopen-error-message-crash.js +++ b/test/parallel/test-process-dlopen-error-message-crash.js @@ -17,7 +17,7 @@ assert.throws(() => { }, ({ name, code, message }) => { assert.strictEqual(name, 'Error'); assert.strictEqual(code, 'ERR_DLOPEN_FAILED'); - if (!common.isAIX) { + if (!common.isAIX && !common.isIBMi) { assert.match(message, /foo-%s\.node/); } return true;