Commit f4211a0e authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #1159: This test needs to run in a subthread (see comments)

parent d9edc9b8
......@@ -140,14 +140,7 @@ test('conc060', reqlib('stm'), compile_and_run, ['-package stm'])
test('conc061', reqlib('stm'), compile_and_run, ['-package stm'])
test('conc062', reqlib('stm'), compile_and_run, ['-package stm'])
# omit conc063(ghci) on Windows for now; it hangs and doesn't get killed by
# the timeout program, and it holds up the entire run.
if config.platform == "i386-unknown-mingw32":
config063 = omit_ways(['ghci'])
else:
config063 = normal
test('conc063', compose(reqlib('stm'), config063), compile_and_run, ['-package stm'])
test('conc063', reqlib('stm'), compile_and_run, ['-package stm'])
test('conc064', exit_code(1), compile_and_run, [''])
......
......@@ -8,6 +8,15 @@ import System.IO
-- Test invariants using updates & blocking in invariants
main = do
m <- newEmptyMVar
forkIO (do_test m)
takeMVar m
-- We do the test in a separate thread, because this test relies on
-- being able to catch BlockedIndefinitely, and the main thread
-- won't receive that exception under GHCi because it is held alive
-- by the interrupt (^C) handler thread.
do_test m = do
newStablePtr stdout
putStr "\nStarting\n"
......@@ -42,4 +51,4 @@ main = do
Control.Exception.catch (atomically ( writeTVar x1 0 ))
(\e -> putStr ("Caught: " ++ (show e) ++ "\n"))
putMVar m ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment