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 <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • 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.