summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-02-27 14:42:10 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-02-27 14:42:10 +0000
commit36c9b792a565dc095a8ff3c43a11b61dae23d030 (patch)
tree3312693160a7a1a174a62b0eefe633e91f11a372 /testsuite/tests
parent2453e1045004b8abfc6123fb37ee8d7811c0b1c6 (diff)
downloadhaskell-36c9b792a565dc095a8ff3c43a11b61dae23d030.tar.gz
add test for #5866
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/concurrent/should_run/5866.hs10
-rw-r--r--testsuite/tests/concurrent/should_run/5866.stderr1
-rw-r--r--testsuite/tests/concurrent/should_run/all.T1
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/5866.hs b/testsuite/tests/concurrent/should_run/5866.hs
new file mode 100644
index 0000000000..4650ea66e9
--- /dev/null
+++ b/testsuite/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/testsuite/tests/concurrent/should_run/5866.stderr b/testsuite/tests/concurrent/should_run/5866.stderr
new file mode 100644
index 0000000000..a4774f25ab
--- /dev/null
+++ b/testsuite/tests/concurrent/should_run/5866.stderr
@@ -0,0 +1 @@
+5866: thread blocked indefinitely in an STM transaction
diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T
index 5c5a914022..375dc6ff1e 100644
--- a/testsuite/tests/concurrent/should_run/all.T
+++ b/testsuite/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