mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: allow SIGBUS in signal-handler abort test
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>
This commit is contained in:
parent
3d003543b7
commit
3c82d48cc0
@ -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}`,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user