[commit: testsuite] master: add test for #5866 (bf4e4e5)

Simon Marlow marlowsd at gmail.com
Mon Feb 27 16:29:48 CET 2012


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

On branch  : master

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

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

commit bf4e4e5356fcc07e6b6037ebe6b4d236fa35b784
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Mon Feb 27 14:42:10 2012 +0000

    add test for #5866

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

 tests/concurrent/should_run/5866.hs     |   10 ++++++++++
 tests/concurrent/should_run/5866.stderr |    1 +
 tests/concurrent/should_run/all.T       |    1 +
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/concurrent/should_run/5866.hs b/tests/concurrent/should_run/5866.hs
new file mode 100644
index 0000000..4650ea6
--- /dev/null
+++ b/tests/concurrent/should_run/5866.hs
@@ -0,0 +1,10 @@
+import GHC.Conc
+import Control.Exception
+import System.IO.Unsafe
+import System.Timeout
+
+main :: IO ()
+main = do
+    x <- unsafeInterleaveIO $ atomically retry
+    _ <- timeout 500000 $ evaluate x
+    evaluate x
diff --git a/tests/concurrent/should_run/5866.stderr b/tests/concurrent/should_run/5866.stderr
new file mode 100644
index 0000000..a4774f2
--- /dev/null
+++ b/tests/concurrent/should_run/5866.stderr
@@ -0,0 +1 @@
+5866: thread blocked indefinitely in an STM transaction
diff --git a/tests/concurrent/should_run/all.T b/tests/concurrent/should_run/all.T
index 5c5a914..375dc6f 100644
--- a/tests/concurrent/should_run/all.T
+++ b/tests/concurrent/should_run/all.T
@@ -68,6 +68,7 @@ test('5558',
 test('5421', normal, compile_and_run, [''])
 test('5611', normal, compile_and_run, [''])
 test('5238', normal, compile_and_run, [''])
+test('5866', exit_code(1), compile_and_run, [''])
 
 # -----------------------------------------------------------------------------
 # These tests we only do for a full run





More information about the Cvs-ghc mailing list