Skip to content

Commit

Permalink
test: fix domain with abort-on-uncaught on PPC
Browse files Browse the repository at this point in the history
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: #3354
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
  • Loading branch information
Julien Gilli committed Oct 14, 2015
1 parent 85b74de commit f45c315
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions test/parallel/test-domain-with-abort-on-uncaught-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f45c315

Please sign in to comment.