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 <[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]>
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

+2-2
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)