Skip to content

Commit b85a734

Browse files
TrottMylesBorins
authored andcommitted
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: #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>
1 parent 989dfaf commit b85a734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/abort/test-abort-uncaught-exception.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (process.argv[2] === 'child') {
99
throw new Error('child error');
1010
} else {
1111
run('', null);
12-
run('--abort-on-uncaught-exception', ['SIGABRT', 'SIGILL']);
12+
run('--abort-on-uncaught-exception', ['SIGABRT', 'SIGTRAP', 'SIGILL']);
1313
}
1414

1515
function run(flags, signals) {
@@ -26,7 +26,7 @@ function run(flags, signals) {
2626
assert.strictEqual(code, 1);
2727
} else {
2828
if (signals)
29-
assert.strictEqual(signals.includes(sig), true);
29+
assert(signals.includes(sig), `Unexpected signal ${sig}`);
3030
else
3131
assert.strictEqual(sig, null);
3232
}

0 commit comments

Comments
 (0)