Skip to content

Commit 85f062c

Browse files
bakigul1targos
authored andcommitted
test: deflake async-hooks/test-improper-order on AIX
PR-URL: #58567 Fixes: #58562 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent e9c6fa5 commit 85f062c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/async-hooks/test-improper-order.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@ if (process.argv[2] === 'child') {
5151
child.stderr.on('data', (d) => { errData = Buffer.concat([ errData, d ]); });
5252
child.stdout.on('data', (d) => { outData = Buffer.concat([ outData, d ]); });
5353

54-
child.on('close', common.mustCall((code) => {
55-
assert.strictEqual(code, 1);
54+
child.on('close', common.mustCall((code, signal) => {
55+
if ((common.isAIX ||
56+
(common.isLinux && process.arch === 'x64')) &&
57+
signal === 'SIGABRT') {
58+
// XXX: The child process could be aborted due to unknown reasons. Work around it.
59+
} else {
60+
assert.strictEqual(signal, null);
61+
assert.strictEqual(code, 1);
62+
}
5663
assert.match(outData.toString(), heartbeatMsg,
5764
'did not crash until we reached offending line of code ' +
5865
`(found ${outData})`);

0 commit comments

Comments
 (0)