[commit: testsuite] master: add a test for #8209 (26234b2)
git at git.haskell.org
git at git.haskell.org
Wed Sep 4 12:38:03 CEST 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/26234b25459cdf7b3509abd8ef854471b8adff8a/testsuite
>---------------------------------------------------------------
commit 26234b25459cdf7b3509abd8ef854471b8adff8a
Author: Simon Marlow <marlowsd at gmail.com>
Date: Wed Sep 4 10:39:13 2013 +0100
add a test for #8209
>---------------------------------------------------------------
26234b25459cdf7b3509abd8ef854471b8adff8a
tests/rts/T8209.hs | 13 +++++++++++++
tests/rts/all.T | 3 +++
2 files changed, 16 insertions(+)
diff --git a/tests/rts/T8209.hs b/tests/rts/T8209.hs
new file mode 100644
index 0000000..edfab5c
--- /dev/null
+++ b/tests/rts/T8209.hs
@@ -0,0 +1,13 @@
+import Control.Concurrent
+import Control.Monad
+import GHC.Conc
+
+main = do
+ mainTid <- myThreadId
+ labelThread mainTid "main"
+ forM_ [0..0] $ \i -> forkIO $ do
+ subTid <- myThreadId
+ labelThread subTid $ "sub " ++ show i
+ forM_ [0..100000000] $ \j -> putStrLn $ "sub " ++ show i ++ ": " ++ show j
+ yield
+ setNumCapabilities 2
diff --git a/tests/rts/all.T b/tests/rts/all.T
index 6b5e5f6..7e19349 100644
--- a/tests/rts/all.T
+++ b/tests/rts/all.T
@@ -185,3 +185,6 @@ test('linker_unload',
[ extra_clean(['Test.o','Test.hi', 'linker_unload']) ],
run_command,
['$MAKE -s --no-print-directory linker_unload'])
+
+test('T8209', [ only_ways(threaded_ways), ignore_output ],
+ compile_and_run, [''])
More information about the ghc-commits
mailing list