Skip to content

Commit d3b857f

Browse files
targosdenihs
authored andcommitted
test: allow SIGBUS in signal-handler abort test
FreeBSD uses SIGBUS after update to v12.4. Refs: nodejs/build#3134 PR-URL: nodejs#47851 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent e57861e commit d3b857f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/abort/test-signal-handler.js

Lines changed: 6 additions & 3 deletions
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)