diff options
author | Rich Trott <rtrott@gmail.com> | 2017-08-24 22:18:47 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-08-26 16:30:25 -0700 |
commit | acdf5585510c4d6ec3f7ef9c44965ae068fd0b72 (patch) | |
tree | bebb263d5240c0a16af192f35df2f83dbc02c9d4 /test/abort | |
parent | f912080bf2d8fd024d3443f3ab9e399bc84a724b (diff) | |
download | android-node-v8-acdf5585510c4d6ec3f7ef9c44965ae068fd0b72.tar.gz android-node-v8-acdf5585510c4d6ec3f7ef9c44965ae068fd0b72.tar.bz2 android-node-v8-acdf5585510c4d6ec3f7ef9c44965ae068fd0b72.zip |
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>
Diffstat (limited to 'test/abort')
-rw-r--r-- | test/abort/test-abort-uncaught-exception.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/abort/test-abort-uncaught-exception.js b/test/abort/test-abort-uncaught-exception.js index fb30cfba3c..e88a56a489 100644 --- a/test/abort/test-abort-uncaught-exception.js +++ b/test/abort/test-abort-uncaught-exception.js @@ -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); } |