diff --git a/test/async-hooks/test-emit-after-on-destroyed.js b/test/async-hooks/test-emit-after-on-destroyed.js index 913cec7bd6a61b..719d6ab91a54fc 100644 --- a/test/async-hooks/test-emit-after-on-destroyed.js +++ b/test/async-hooks/test-emit-after-on-destroyed.js @@ -55,7 +55,7 @@ if (process.argv[2] === 'child') { child.on('close', common.mustCall((code, signal) => { if ((common.isAIX || (common.isLinux && process.arch === 'x64')) && - signal === 'SIGABRT') { + common.nodeProcessAborted(code, signal)) { // XXX: The child process could be aborted due to unknown reasons. Work around it. } else { assert.strictEqual(signal, null); diff --git a/test/async-hooks/test-improper-order.js b/test/async-hooks/test-improper-order.js index f39c79a72bc85c..47678fb19777e3 100644 --- a/test/async-hooks/test-improper-order.js +++ b/test/async-hooks/test-improper-order.js @@ -53,8 +53,8 @@ if (process.argv[2] === 'child') { child.on('close', common.mustCall((code, signal) => { if ((common.isAIX || - (common.isLinux && process.arch === 'x64')) && - signal === 'SIGABRT') { + (common.isLinux && process.arch === 'x64')) && + common.nodeProcessAborted(code, signal)) { // XXX: The child process could be aborted due to unknown reasons. Work around it. } else { assert.strictEqual(signal, null); diff --git a/test/async-hooks/test-improper-unwind.js b/test/async-hooks/test-improper-unwind.js index fb7f212a6804b2..9e651b3bc50f4e 100644 --- a/test/async-hooks/test-improper-unwind.js +++ b/test/async-hooks/test-improper-unwind.js @@ -58,7 +58,7 @@ if (process.argv[2] === 'child') { child.on('close', common.mustCall((code, signal) => { if ((common.isAIX || (common.isLinux && process.arch === 'x64')) && - signal === 'SIGABRT') { + common.nodeProcessAborted(code, signal)) { // XXX: The child process could be aborted due to unknown reasons. Work around it. } else { assert.strictEqual(signal, null);