summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2023-05-05 13:03:38 +0200
committerMichaël Zasso <targos@protonmail.com>2023-05-05 13:06:19 +0200
commit9bbd9915887b87aa67ef9fd075bface683b7b53f (patch)
treef8ed57bcd189a317ef770d799735c9affb39cc57
parentade485039533e64cbfaee8e6b5154a47f20107c7 (diff)
downloadnode-new-9bbd9915887b87aa67ef9fd075bface683b7b53f.tar.gz
test: allow SIGBUS in signal-handler abort testv16.x-staging
FreeBSD uses SIGBUS after update to v12.4. Refs: https://github.com/nodejs/build/issues/3134 PR-URL: https://github.com/nodejs/node/pull/47851 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
-rw-r--r--test/abort/test-signal-handler.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/abort/test-signal-handler.js b/test/abort/test-signal-handler.js
index 6ee7e4098a..a99a846474 100644
--- a/test/abort/test-signal-handler.js
+++ b/test/abort/test-signal-handler.js
@@ -17,8 +17,11 @@ if (process.argv[2] === 'child') {
const child = spawnSync(process.execPath,
['--expose-internals', __filename, 'child'],
{ stdio: 'inherit' });
- // FreeBSD uses SIGILL for this kind of crash.
+ // FreeBSD uses SIGILL (v12.2) or SIGBUS (v12.4 and greater) for this kind of crash.
// macOS uses SIGILL or SIGTRAP (arm64) for this kind of crash.
- assert(child.signal === 'SIGSEGV' || child.signal === 'SIGILL' ||
- child.signal === 'SIGTRAP', `child.signal = ${child.signal}`);
+ const allowedSignals = ['SIGSEGV', 'SIGILL', 'SIGTRAP', 'SIGBUS'];
+ assert(
+ allowedSignals.includes(child.signal),
+ `child.signal = ${child.signal}`,
+ );
}