[commit: ghc] master: base: Add test for #8684 (37d7c15)
git at git.haskell.org
git at git.haskell.org
Wed Apr 5 00:49:49 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/37d7c1596ee936ec6597a5c1898e1fdca7c04f77/ghc
>---------------------------------------------------------------
commit 37d7c1596ee936ec6597a5c1898e1fdca7c04f77
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue Apr 4 20:48:35 2017 -0400
base: Add test for #8684
Reviewers: austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3420
>---------------------------------------------------------------
37d7c1596ee936ec6597a5c1898e1fdca7c04f77
libraries/base/tests/T8684.hs | 16 ++++++++++++++++
libraries/base/tests/all.T | 1 +
2 files changed, 17 insertions(+)
diff --git a/libraries/base/tests/T8684.hs b/libraries/base/tests/T8684.hs
new file mode 100644
index 0000000..87a3769
--- /dev/null
+++ b/libraries/base/tests/T8684.hs
@@ -0,0 +1,16 @@
+import Control.Concurrent
+import System.IO
+import System.Timeout
+
+main :: IO ()
+main = do
+ forkIO $ do
+ threadDelay (5 * 1000000)
+ -- The timeout should terminate before we ever make it here
+ putStrLn "t=5 seconds: we shouldn't be here"
+
+ timeout (1 * 1000000) $ do
+ hWaitForInput stdin (10 * 1000)
+ putStrLn "we shouldn't be here"
+
+ return ()
diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T
index 49298d3..69705bc 100644
--- a/libraries/base/tests/all.T
+++ b/libraries/base/tests/all.T
@@ -189,6 +189,7 @@ test('T9681', normal, compile_fail, [''])
test('T8089',
[exit_code(99), run_timeout_multiplier(0.01)],
compile_and_run, [''])
+test('T8684', expect_broken(8684), compile_and_run, [''])
test('T9826',normal, compile_and_run,[''])
test('T9848',
[ stats_num_field('bytes allocated',
More information about the ghc-commits
mailing list