From 0429131e3208f49e2a32b16e309ee71c0406d8f0 Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Tue, 13 Oct 2015 17:07:35 -0700 Subject: [PATCH] test: fix domain with abort-on-uncaught on PPC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add SIGTRAP and the corresponding exit code to the list of signals/exit codes that are expected when running tests that throw an uncaught error and have --abort-on-uncaught-exception enabled. Also refactor a bit related comments so that they better reflect what's actually happening. Fixes #3239. PR: #3354 PR-URL: https://github.com/nodejs/node/pull/3354 Reviewed-By: Colin Ihrig Reviewed-By: Johan Bergström --- ...test-domain-with-abort-on-uncaught-exception.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/test/parallel/test-domain-with-abort-on-uncaught-exception.js b/test/parallel/test-domain-with-abort-on-uncaught-exception.js index 9892ad6..bef952b 100644 --- a/test/parallel/test-domain-with-abort-on-uncaught-exception.js +++ b/test/parallel/test-domain-with-abort-on-uncaught-exception.js @@ -135,20 +135,16 @@ if (process.argv[2] === 'child') { // --abort_on_uncaught_exception is passed on the command line, // the process must abort. // - // We use an array of values since the actual exit code can differ - // across compilers. // Depending on the compiler used, node will exit with either - // exit code 132 (SIGILL) or 134 (SIGABRT). - expectedExitCodes = [132, 134]; - - // On platforms using a non-GNU compiler, base::OS::Abort raises - // an illegal instruction signal. - // On platforms using a GNU compiler but with KSH being the - // default shell (like SmartOS), when a process aborts, KSH exits - // with an exit code that is greater than 256, and thus the exit - // code emitted with the 'exit' event is null and the signal is - // set to either SIGABRT or SIGILL. - expectedSignals = ['SIGABRT', 'SIGILL']; + // exit code 132 (SIGILL), 133 (SIGTRAP) or 134 (SIGABRT). + expectedExitCodes = [132, 133, 134]; + + // On platforms using KSH as the default shell (like SmartOS), + // when a process aborts, KSH exits with an exit code that is + // greater than 256, and thus the exit code emitted with the 'exit' + // event is null and the signal is set to either SIGILL, SIGTRAP, + // or SIGABRT (depending on the compiler). + expectedSignals = ['SIGILL', 'SIGTRAP', 'SIGABRT']; // On Windows, v8's base::OS::Abort triggers an access violation, // which corresponds to exit code 3221225477 (0xC0000005) -- 2.7.4