[Git][ghc/ghc][wip/sjakobi/T26964] testsuite: keep exit code 134 for -fcheck-prim-bounds tests on the JS backend
Simon Jakobi pushed to branch wip/sjakobi/T26964 at Glasgow Haskell Compiler / GHC Commits: faeb0540 by Simon Jakobi at 2026-06-04T01:27:11+02:00 testsuite: keep exit code 134 for -fcheck-prim-bounds tests on the JS backend The improved -fcheck-prim-bounds error messages and EXIT_FAILURE (1) exit status are native-only; the JS backend still aborts via h$exitProcess(134). Expect 134 on the JS arch for the bulk tests, and skip the message-pinning tests T26964/T26964b there, since the JS backend emits no message. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> - - - - - 1 changed file: - testsuite/tests/codeGen/should_fail/all.T Changes: ===================================== testsuite/tests/codeGen/should_fail/all.T ===================================== @@ -6,8 +6,10 @@ test('T8131', [cmm_src, only_ways(llvm_ways)], compile_fail, ['-no-hs-main']) def check_bounds_test(name): """ A -fcheck-prim-bounds test that is expected to fail. """ + # The native backend exits with EXIT_FAILURE (1); the JS backend still + # aborts with h$exitProcess(134) (the improved messages are native-only). test(name, - [ignore_stderr, omit_ghci, exit_code(1)], + [ignore_stderr, omit_ghci, exit_code(134 if js_arch() else 1)], compile_and_run, ['-fcheck-prim-bounds']) check_bounds_test('CheckBoundsWriteArray') # Check past end @@ -33,9 +35,10 @@ def strip_prog_prefix(s): return re.sub(r'(?m)^.*?(\w+#: array access)', r'\1', s) # T26964 checks the single-element message. T26964b checks the range variant. +# Skipped on the JS backend, which emits no message and aborts with code 134. test('T26964', - [omit_ghci, exit_code(1), normalise_errmsg_fun(strip_prog_prefix)], + [omit_ghci, js_skip, exit_code(1), normalise_errmsg_fun(strip_prog_prefix)], compile_and_run, ['-fcheck-prim-bounds']) test('T26964b', - [omit_ghci, exit_code(1), normalise_errmsg_fun(strip_prog_prefix)], + [omit_ghci, js_skip, exit_code(1), normalise_errmsg_fun(strip_prog_prefix)], compile_and_run, ['-fcheck-prim-bounds']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/faeb0540a61b6f4e3fa1210ae364f484... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/faeb0540a61b6f4e3fa1210ae364f484... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)