Skip to content

Commit

Permalink
test: improve test-abort-uncaught-exception
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trott authored and MylesBorins committed Sep 12, 2017
1 parent 989dfaf commit b85a734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/abort/test-abort-uncaught-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
Expand Down

0 comments on commit b85a734

Please sign in to comment.