Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 035e063

Browse filesBrowse files
richardlaunodejs-github-bot
authored andcommitted
test: disambiguate AIX and IBM i
When built with Python 3.9 on IBM i, `process.platform` will return `os400` instead of `aix`. In preparation for this, make `common.isAIX` only return true for AIX and update the tests to add checks for `common.isIBMi` where they were missing. PR-URL: #48056 Refs: #46739 Refs: nodejs/build#3358 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 53b5545 commit 035e063
Copy full SHA for 035e063
Expand file treeCollapse file tree

13 files changed

+25
-18
lines changed
Open diff view settings
Collapse file

‎test/abort/test-addon-uv-handle-leak.js‎

Copy file name to clipboardExpand all lines: test/abort/test-addon-uv-handle-leak.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ if (process.argv[2] === 'child') {
7878

7979
if (!(common.isFreeBSD ||
8080
common.isAIX ||
81+
common.isIBMi ||
8182
(common.isLinux && !isGlibc()) ||
8283
common.isWindows)) {
8384
assert(stderr.includes('ExampleOwnerClass'), stderr);
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ if (process.argv.length === 2 &&
123123
}
124124

125125
const isWindows = process.platform === 'win32';
126-
const isAIX = process.platform === 'aix';
127126
const isSunOS = process.platform === 'sunos';
128127
const isFreeBSD = process.platform === 'freebsd';
129128
const isOpenBSD = process.platform === 'openbsd';
@@ -274,7 +273,7 @@ function platformTimeout(ms) {
274273
if (process.features.debug)
275274
ms = multipliers.two * ms;
276275

277-
if (isAIX)
276+
if (exports.isAIX || exports.isIBMi)
278277
return multipliers.two * ms; // Default localhost speed is slower on AIX
279278

280279
if (isPi)
@@ -928,7 +927,6 @@ const common = {
928927
hasQuic,
929928
hasMultiLocalhost,
930929
invalidArgTypeHelper,
931-
isAIX,
932930
isAlive,
933931
isAsan,
934932
isDumbTerminal,
@@ -999,7 +997,12 @@ const common = {
999997
},
1000998

1001999
// On IBMi, process.platform and os.platform() both return 'aix',
1000+
// when built with Python versions earlier than 3.9.
10021001
// It is not enough to differentiate between IBMi and real AIX system.
1002+
get isAIX() {
1003+
return require('os').type() === 'AIX';
1004+
},
1005+
10031006
get isIBMi() {
10041007
return require('os').type() === 'OS400';
10051008
},
Collapse file

‎test/known_issues/test-cwd-enoent-file.js‎

Copy file name to clipboardExpand all lines: test/known_issues/test-cwd-enoent-file.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const common = require('../common');
66
const assert = require('assert');
77

8-
if (common.isSunOS || common.isWindows || common.isAIX) {
8+
if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi) {
99
// The current working directory cannot be removed on these platforms.
1010
// Change this to common.skip() when this is no longer a known issue test.
1111
assert.fail('cannot rmdir current working directory');
Collapse file

‎test/parallel/test-cwd-enoent-preload.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cwd-enoent-preload.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../common');
33
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
4-
if (common.isSunOS || common.isWindows || common.isAIX)
4+
if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi)
55
common.skip('cannot rmdir current working directory');
66
if (!common.isMainThread)
77
common.skip('process.chdir is not available in Workers');
Collapse file

‎test/parallel/test-cwd-enoent-repl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cwd-enoent-repl.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../common');
33
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
4-
if (common.isSunOS || common.isWindows || common.isAIX)
4+
if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi)
55
common.skip('cannot rmdir current working directory');
66
if (!common.isMainThread)
77
common.skip('process.chdir is not available in Workers');
Collapse file

‎test/parallel/test-cwd-enoent.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cwd-enoent.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../common');
33
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
4-
if (common.isSunOS || common.isWindows || common.isAIX)
4+
if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi)
55
common.skip('cannot rmdir current working directory');
66
if (!common.isMainThread)
77
common.skip('process.chdir is not available in Workers');
Collapse file

‎test/parallel/test-fs-readfile-pipe-large.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-readfile-pipe-large.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const common = require('../common');
33

44
// Simulate `cat readfile.js | node readfile.js`
55

6-
if (common.isWindows || common.isAIX)
6+
if (common.isWindows || common.isAIX || common.isIBMi)
77
common.skip(`No /dev/stdin on ${process.platform}.`);
88

99
const assert = require('assert');
Collapse file

‎test/parallel/test-fs-readfile-pipe.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-readfile-pipe.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const common = require('../common');
2424

2525
// Simulate `cat readfile.js | node readfile.js`
2626

27-
if (common.isWindows || common.isAIX)
27+
if (common.isWindows || common.isAIX || common.isIBMi)
2828
common.skip(`No /dev/stdin on ${process.platform}.`);
2929

3030
const assert = require('assert');
Collapse file

‎test/parallel/test-fs-readfilesync-pipe-large.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-readfilesync-pipe-large.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const common = require('../common');
33

44
// Simulate `cat readfile.js | node readfile.js`
55

6-
if (common.isWindows || common.isAIX)
6+
if (common.isWindows || common.isAIX || common.isIBMi)
77
common.skip(`No /dev/stdin on ${process.platform}.`);
88

99
const assert = require('assert');
Collapse file

‎test/parallel/test-fs-realpath-pipe.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-realpath-pipe.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const common = require('../common');
44

5-
if (common.isWindows || common.isAIX)
5+
if (common.isWindows || common.isAIX || common.isIBMi)
66
common.skip(`No /dev/stdin on ${process.platform}.`);
77

88
const assert = require('assert');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.