test: improve test-abort-uncaught-exception
Add `SIGTRAP` to allowed signals (seen on PPC machines in CI). Improve message when assertion fails in test-abort-uncaught-exception by providing the signal name that was not expected. PR-URL: https://github.com/nodejs/node/pull/14013 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
parent
f912080bf2
commit
acdf558551
@ -9,7 +9,7 @@ if (process.argv[2] === 'child') {
|
||||
throw new Error('child error');
|
||||
} else {
|
||||
run('', null);
|
||||
run('--abort-on-uncaught-exception', ['SIGABRT', 'SIGILL']);
|
||||
run('--abort-on-uncaught-exception', ['SIGABRT', 'SIGTRAP', 'SIGILL']);
|
||||
}
|
||||
|
||||
function run(flags, signals) {
|
||||
@ -26,7 +26,7 @@ function run(flags, signals) {
|
||||
assert.strictEqual(code, 1);
|
||||
} else {
|
||||
if (signals)
|
||||
assert.strictEqual(signals.includes(sig), true);
|
||||
assert(signals.includes(sig), `Unexpected signal ${sig}`);
|
||||
else
|
||||
assert.strictEqual(sig, null);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user