Skip to content

Commit f45c315

Browse files
author
Julien Gilli
committed
test: fix domain with abort-on-uncaught on PPC
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]>
1 parent 85b74de commit f45c315

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

test/parallel/test-domain-with-abort-on-uncaught-exception.js

+9-13
Original file line numberDiff line numberDiff line change
@@ -135,20 +135,16 @@ if (process.argv[2] === 'child') {
135135
// --abort_on_uncaught_exception is passed on the command line,
136136
// the process must abort.
137137
//
138-
// We use an array of values since the actual exit code can differ
139-
// across compilers.
140138
// Depending on the compiler used, node will exit with either
141-
// exit code 132 (SIGILL) or 134 (SIGABRT).
142-
expectedExitCodes = [132, 134];
143-
144-
// On platforms using a non-GNU compiler, base::OS::Abort raises
145-
// an illegal instruction signal.
146-
// On platforms using a GNU compiler but with KSH being the
147-
// default shell (like SmartOS), when a process aborts, KSH exits
148-
// with an exit code that is greater than 256, and thus the exit
149-
// code emitted with the 'exit' event is null and the signal is
150-
// set to either SIGABRT or SIGILL.
151-
expectedSignals = ['SIGABRT', 'SIGILL'];
139+
// exit code 132 (SIGILL), 133 (SIGTRAP) or 134 (SIGABRT).
140+
expectedExitCodes = [132, 133, 134];
141+
142+
// On platforms using KSH as the default shell (like SmartOS),
143+
// when a process aborts, KSH exits with an exit code that is
144+
// greater than 256, and thus the exit code emitted with the 'exit'
145+
// event is null and the signal is set to either SIGILL, SIGTRAP,
146+
// or SIGABRT (depending on the compiler).
147+
expectedSignals = ['SIGILL', 'SIGTRAP', 'SIGABRT'];
152148

153149
// On Windows, v8's base::OS::Abort triggers an access violation,
154150
// which corresponds to exit code 3221225477 (0xC0000005)

0 commit comments

Comments
 (0)