From 74e84d732d6bec715d0eded4d997c07143bd83ed Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Sun, 31 May 2026 22:06:17 -0700 Subject: [PATCH] test: accept SIGILL aborts in async-hooks tests Use common.nodeProcessAborted() for the intentional abort path so platform-specific abort signals such as SIGILL are accepted. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 --- test/async-hooks/test-emit-after-on-destroyed.js | 2 +- test/async-hooks/test-improper-order.js | 4 ++-- test/async-hooks/test-improper-unwind.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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);