Skip to content

Commit d25c785

Browse files
committed
test: allow SIGBUS in signal-handler abort test
FreeBSD uses SIGBUS after update to v12.4. Refs: nodejs/build#3134 PR-URL: #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>
1 parent 0f46a4f commit d25c785

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/abort/test-signal-handler.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ if (process.argv[2] === 'child') {
1717
const child = spawnSync(process.execPath,
1818
['--expose-internals', __filename, 'child'],
1919
{ stdio: 'inherit' });
20-
// FreeBSD uses SIGILL for this kind of crash.
20+
// FreeBSD uses SIGILL (v12.2) or SIGBUS (v12.4 and greater) for this kind of crash.
2121
// macOS uses SIGILL or SIGTRAP (arm64) for this kind of crash.
22-
assert(child.signal === 'SIGSEGV' || child.signal === 'SIGILL' ||
23-
child.signal === 'SIGTRAP', `child.signal = ${child.signal}`);
22+
const allowedSignals = ['SIGSEGV', 'SIGILL', 'SIGTRAP', 'SIGBUS'];
23+
assert(
24+
allowedSignals.includes(child.signal),
25+
`child.signal = ${child.signal}`,
26+
);
2427
}

0 commit comments

Comments
 (0)