From b85a73407b4b321b41980330490ec2433d05d08c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 24 Aug 2017 22:18:47 -0700 Subject: [PATCH] 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 Reviewed-By: Refael Ackermann Reviewed-By: Ben Noordhuis Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Yuta Hiroto Reviewed-By: Sakthipriyan Vairamani --- test/abort/test-abort-uncaught-exception.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/abort/test-abort-uncaught-exception.js b/test/abort/test-abort-uncaught-exception.js index f9847193769d2d..efb5aa9b8b8285 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); }