Skip to content

Commit eb4bd35

Browse files
committed
test: allow SIGBUS in signal-handler abort test
FreeBSD uses SIGBUS after update to v12.4. Refs: nodejs/build#3134
1 parent 76ae7be commit eb4bd35

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) 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)