[commit: ghc] ghc-8.2: Make the test fail if compiled without -threaded (67f00af)

git at git.haskell.org git at git.haskell.org
Wed Mar 29 23:41:37 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/67f00af62b4103a1bbabac0f463aa93bea059714/ghc

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

commit 67f00af62b4103a1bbabac0f463aa93bea059714
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Mon Mar 27 16:09:23 2017 +0100

    Make the test fail if compiled without -threaded
    
    Test Plan: validate
    
    Reviewers: bgamari, austin, erikd
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3387
    
    (cherry picked from commit c77551abd42a346d03826d23df710ebf9eacb19f)


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

67f00af62b4103a1bbabac0f463aa93bea059714
 testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs b/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs
index d74a9cb..4442698 100644
--- a/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs
+++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs
@@ -10,6 +10,7 @@ import GHC.Conc
 import GHC.MVar (MVar(..))
 import GHC.Prim
 import System.Environment
+import System.Exit
 
 -- Measure C to Haskell callback throughput under a workload with
 -- several dimensions:
@@ -29,6 +30,8 @@ import System.Environment
 -- hs_try_putmvar() is 9x faster with these parameters.
 
 main = do
+   when (not rtsSupportsBoundThreads) $
+     die "This test requires -threaded"
    args <- getArgs
    case args of
      ["1",x,y,z] -> experiment False (read x) (read y) (read z)



More information about the ghc-commits mailing list