[Git][ghc/ghc][wip/decode_cloned_stack] Fix tests
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Sun Feb 5 14:34:52 UTC 2023
Sven Tennie pushed to branch wip/decode_cloned_stack at Glasgow Haskell Compiler / GHC
Commits:
ae0d6694 by Sven Tennie at 2023-02-05T14:34:27+00:00
Fix tests
- - - - -
2 changed files:
- libraries/ghc-heap/tests/ClosureSizeUtils.hs
- libraries/ghc-heap/tests/all.T
Changes:
=====================================
libraries/ghc-heap/tests/ClosureSizeUtils.hs
=====================================
@@ -11,6 +11,7 @@ module ClosureSizeUtils (assertSize, assertSizeUnlifted) where
import Control.Monad
import GHC.Exts
+import GHC.Exts.Heap
import GHC.Exts.Heap.Closures
import GHC.Stack
import Type.Reflection
@@ -45,7 +46,7 @@ assertSizeBox
-> Int -- ^ expected size in words
-> IO ()
assertSizeBox x ty expected = do
- let !size = closureSize x
+ !size <- closureSize x
when (size /= expected') $ do
putStrLn $ "closureSize ("++show ty++") == "++show size++", expected "++show expected'
putStrLn $ prettyCallStack callStack
=====================================
libraries/ghc-heap/tests/all.T
=====================================
@@ -39,20 +39,20 @@ test('closure_size_noopt',
compile_and_run, [''])
test('tso_and_stack_closures',
- [extra_files(['create_tso.c','create_tso.h','TestUtils.hs','stack_lib.c']),
+ [extra_files(['create_tso.c','create_tso.h','TestUtils.hs']),
only_ways(['profthreaded']),
ignore_stdout,
ignore_stderr
],
- multi_compile_and_run, ['tso_and_stack_closures', [('create_tso.c',''), ('stack_lib.c', '')], ''])
+ multi_compile_and_run, ['tso_and_stack_closures', [('create_tso.c','')], ''])
test('parse_tso_flags',
- [extra_files(['stack_lib.c', 'TestUtils.hs']),
+ [extra_files(['TestUtils.hs']),
only_ways(['normal']),
ignore_stdout,
ignore_stderr
],
- multi_compile_and_run, ['parse_tso_flags', [('stack_lib.c','')], ''])
+ compile_and_run, [''])
test('T21622',
only_ways(['normal']),
compile_and_run, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ae0d6694b68983c7b4b098451e2b59a466ec8cd4
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ae0d6694b68983c7b4b098451e2b59a466ec8cd4
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/20230205/2d2f8e70/attachment-0001.html>
More information about the ghc-commits
mailing list