diff --git a/ghc/tests/concurrent/should_run/Makefile b/ghc/tests/concurrent/should_run/Makefile index e53d38ff638366e0c093b042c98e809391c0171e..fb804f0b4e840442826c294ee1fed8b47afb74bd 100644 --- a/ghc/tests/concurrent/should_run/Makefile +++ b/ghc/tests/concurrent/should_run/Makefile @@ -1,12 +1,11 @@ #----------------------------------------------------------------------------- -# $Id: Makefile,v 1.3 2000/03/13 11:39:22 simonmar Exp $ +# $Id: Makefile,v 1.4 2000/03/21 15:54:25 simonmar Exp $ TOP = ../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/should_run.mk conc009_RUNTEST_OPTS = -x 1 -conc018_RUNTEST_OPTS = -x 1 SRC_HC_OPTS += -dcore-lint -syslib concurrent -fglasgow-exts diff --git a/ghc/tests/concurrent/should_run/conc014.hs b/ghc/tests/concurrent/should_run/conc014.hs index feb97704cad43afbe816a0dcbcd9e5bcb0c4629c..650a0d79d433a0c37df5406ea674aa9a371335e0 100644 --- a/ghc/tests/concurrent/should_run/conc014.hs +++ b/ghc/tests/concurrent/should_run/conc014.hs @@ -10,8 +10,7 @@ main = do forkIO (do { takeMVar m; raiseInThread main_thread (ErrorCall "foo") }) (error "wibble") `catchAllIO` (\e -> do putMVar m () - threadDelay 500000 - putStrLn "done.") + sum [1..10000] `seq` putStrLn "done.") (threadDelay 500000) `catchAllIO` (\e -> putStrLn ("caught: " ++ show e)) diff --git a/ghc/tests/concurrent/should_run/conc015.hs b/ghc/tests/concurrent/should_run/conc015.hs index ad4fc692f7d38ab9b3911a5307692c480a0d4a02..96ce37308957a87b6577ef523d8de47d4a477720 100644 --- a/ghc/tests/concurrent/should_run/conc015.hs +++ b/ghc/tests/concurrent/should_run/conc015.hs @@ -22,8 +22,8 @@ main = do ( do blockAsyncExceptions (do putMVar m () - threadDelay 500000 - (unblockAsyncExceptions (threadDelay 500000)) + sum [1..10000] `seq` -- give 'foo' a chance to be raised + (unblockAsyncExceptions (threadDelay 500000)) `catchAllIO` (\e -> putStrLn ("caught1: " ++ show e)) ) takeMVar m2 diff --git a/ghc/tests/concurrent/should_run/conc016.hs b/ghc/tests/concurrent/should_run/conc016.hs index 803dfdfaf8d473d0daa13dfe6c792cd8c2a57900..e616a42e1ecefae711df77ce59af2eddd5fa7677 100644 --- a/ghc/tests/concurrent/should_run/conc016.hs +++ b/ghc/tests/concurrent/should_run/conc016.hs @@ -12,7 +12,7 @@ main = do ) blockAsyncExceptions (do putMVar m () - threadDelay 500000 -- to be sure the other thread is now blocked - killThread sub_thread + sum [1..10000] `seq` -- to be sure the other thread is now blocked + killThread sub_thread ) putStrLn "ok" diff --git a/ghc/tests/concurrent/should_run/conc017.hs b/ghc/tests/concurrent/should_run/conc017.hs index 283e6de7ad7582fddc57759d9b6f14a501dd4ccc..7bdaad29e8b2bf7559b9e0ceda9bf06f06d89c94 100644 --- a/ghc/tests/concurrent/should_run/conc017.hs +++ b/ghc/tests/concurrent/should_run/conc017.hs @@ -26,7 +26,7 @@ main = do ) `catchAllIO` (\e -> putStrLn ("caught1: " ++ show e)) putMVar m2 () -- blocked here, "bar" can't be delivered - (threadDelay 100000) + (sum [1..10000] `seq` return ()) `catchAllIO` (\e -> putStrLn ("caught2: " ++ show e)) ) -- unblocked here, "bar" delivered to "caught3" diff --git a/ghc/tests/concurrent/should_run/conc018.hs b/ghc/tests/concurrent/should_run/conc018.hs index 753d45b7af304aa9d82d88f0f8656dfcdfc2c0d3..56f0e9ed21bfc7e96975ab3a065b731736c547fc 100644 --- a/ghc/tests/concurrent/should_run/conc018.hs +++ b/ghc/tests/concurrent/should_run/conc018.hs @@ -1,7 +1,8 @@ import Concurrent +import Exception main = do - catch (do + catchAllIO (do m <- newMVar () putMVar m () ) diff --git a/ghc/tests/concurrent/should_run/conc018.stderr b/ghc/tests/concurrent/should_run/conc018.stderr deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ghc/tests/concurrent/should_run/conc018.stdout b/ghc/tests/concurrent/should_run/conc018.stdout new file mode 100644 index 0000000000000000000000000000000000000000..735e880673ea005a08fad7d2cd4840504a68bd43 --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc018.stdout @@ -0,0 +1 @@ +putMVar: full MVar