[commit: testsuite] master: add test for #7636 (bd6ded8)

Simon Marlow marlowsd at gmail.com
Thu Feb 7 11:25:43 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/bd6ded8586edc6aded611a4fc083b1af7cd2f729

>---------------------------------------------------------------

commit bd6ded8586edc6aded611a4fc083b1af7cd2f729
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Thu Feb 7 09:52:20 2013 +0000

    add test for #7636

>---------------------------------------------------------------

 tests/rts/T7636.hs     |   13 +++++++++++++
 tests/rts/T7636.stderr |    1 +
 tests/rts/all.T        |    2 ++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/tests/rts/T7636.hs b/tests/rts/T7636.hs
new file mode 100644
index 0000000..9e3dbd6
--- /dev/null
+++ b/tests/rts/T7636.hs
@@ -0,0 +1,13 @@
+import GHC.Conc.Sync
+import System.Environment
+
+test n = atomically $ f [1..n]
+ where
+  f [] = retry
+  f (x:xs) = do
+    ys <- f xs
+    return (x:ys)
+
+main = do
+  [n] <- getArgs
+  test (read n)
diff --git a/tests/rts/T7636.stderr b/tests/rts/T7636.stderr
new file mode 100644
index 0000000..76984e3
--- /dev/null
+++ b/tests/rts/T7636.stderr
@@ -0,0 +1 @@
+T7636: thread blocked indefinitely in an STM transaction
diff --git a/tests/rts/all.T b/tests/rts/all.T
index 00f9475..2c0ae61 100644
--- a/tests/rts/all.T
+++ b/tests/rts/all.T
@@ -162,3 +162,5 @@ test('T7040_ghci', [ only_ways(['ghci']),
 test('T7227', [ extra_run_opts('+RTS -tT7227.stat --machine-readable -RTS'),
                 extra_clean(['T7227.stat']) ]
             , compile_and_run, [''] )
+
+test('T7636', [ exit_code(1), extra_run_opts('100000') ], compile_and_run, [''] )





More information about the ghc-commits mailing list