diff --git a/test/async-hooks/test-emit-after-on-destroyed.js b/test/async-hooks/test-emit-after-on-destroyed.js index 5de296e6372..913cec7bd6a 100644 --- a/test/async-hooks/test-emit-after-on-destroyed.js +++ b/test/async-hooks/test-emit-after-on-destroyed.js @@ -53,9 +53,12 @@ if (process.argv[2] === 'child') { child.stdout.on('data', (d) => { outData = Buffer.concat([ outData, d ]); }); child.on('close', common.mustCall((code, signal) => { - if (signal) { - console.log(`Child closed with signal: ${signal}`); + if ((common.isAIX || + (common.isLinux && process.arch === 'x64')) && + signal === 'SIGABRT') { + // XXX: The child process could be aborted due to unknown reasons. Work around it. } else { + assert.strictEqual(signal, null); assert.strictEqual(code, 1); } assert.match(outData.toString(), heartbeatMsg, diff --git a/test/async-hooks/test-improper-unwind.js b/test/async-hooks/test-improper-unwind.js index de4ee1b758e..fb7f212a680 100644 --- a/test/async-hooks/test-improper-unwind.js +++ b/test/async-hooks/test-improper-unwind.js @@ -56,9 +56,12 @@ if (process.argv[2] === 'child') { child.stdout.on('data', (d) => { outData = Buffer.concat([ outData, d ]); }); child.on('close', common.mustCall((code, signal) => { - if (signal) { - console.log(`Child closed with signal: ${signal}`); + if ((common.isAIX || + (common.isLinux && process.arch === 'x64')) && + signal === 'SIGABRT') { + // XXX: The child process could be aborted due to unknown reasons. Work around it. } else { + assert.strictEqual(signal, null); assert.strictEqual(code, 1); } assert.match(outData.toString(), heartbeatMsg,