[Git][ghc/ghc][wip/T20201] testsuite: Add tests for RTS flag parsing error handling

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Nov 15 16:25:50 UTC 2024



Ben Gamari pushed to branch wip/T20201 at Glasgow Haskell Compiler / GHC


Commits:
f833c15b by Ben Gamari at 2024-11-15T11:25:40-05:00
testsuite: Add tests for RTS flag parsing error handling

See #20201.

- - - - -


5 changed files:

- + testsuite/tests/rts/T20201a.hs
- + testsuite/tests/rts/T20201a.stderr
- + testsuite/tests/rts/T20201b.hs
- + testsuite/tests/rts/T20201b.stderr
- testsuite/tests/rts/all.T


Changes:

=====================================
testsuite/tests/rts/T20201a.hs
=====================================
@@ -0,0 +1 @@
+main = putStrLn "hi"


=====================================
testsuite/tests/rts/T20201a.stderr
=====================================
@@ -0,0 +1 @@
+T20201a: error in RTS option -AturtlesM: unable to parse number 'turtlesM'


=====================================
testsuite/tests/rts/T20201b.hs
=====================================
@@ -0,0 +1,2 @@
+main = putStrLn "hi"
+


=====================================
testsuite/tests/rts/T20201b.stderr
=====================================
@@ -0,0 +1 @@
+T20201b: error in RTS option -A64z: unknown unit suffix 'z'


=====================================
testsuite/tests/rts/all.T
=====================================
@@ -587,6 +587,10 @@ test('decodeMyStack_emptyListForMissingFlag',
   , js_broken(22261) # cloneMyStack# not yet implemented
   ], compile_and_run, [''])
 
+# Tests RTS flag parsing. Skipped on JS as it uses a distinct RTS.
+test('T20201a', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -AturtlesM'])
+test('T20201b', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -A64z'])
+
 test('T22012', [js_skip, extra_ways(['ghci'])], compile_and_run, ['T22012_c.c'])
 
 # Skip for JS platform as the JS RTS is always single threaded



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f833c15b687d42f5f8927d0d3c7f705523f428ed

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f833c15b687d42f5f8927d0d3c7f705523f428ed
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241115/2c0b2d0f/attachment-0001.html>


More information about the ghc-commits mailing list