[commit: ghc] master: should_run/allocLimit4: disable ghci way (7d5a845)

git at git.haskell.org git at git.haskell.org
Fri Jun 19 21:57:32 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7d5a845365761c125e637cfa0c341b661a57a879/ghc

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

commit 7d5a845365761c125e637cfa0c341b661a57a879
Author: Sergei Trofimovich <siarheit at google.com>
Date:   Fri Jun 19 22:54:15 2015 +0100

    should_run/allocLimit4: disable ghci way
    
    Test sets allocation limit for a current main thread,
    ghci already loaded a bunch of stuff in it.
    
    Signed-off-by: Sergei Trofimovich <siarheit at google.com>


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

7d5a845365761c125e637cfa0c341b661a57a879
 testsuite/tests/concurrent/should_run/all.T          | 4 +++-
 testsuite/tests/concurrent/should_run/allocLimit4.hs | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T
index 2d3ac2e..3d059bd 100644
--- a/testsuite/tests/concurrent/should_run/all.T
+++ b/testsuite/tests/concurrent/should_run/all.T
@@ -99,7 +99,9 @@ test('allocLimit2', normal, compile_and_run, [''])
 test('allocLimit3', [ when(opsys('mingw32'), only_ways(threaded_ways)),
                       exit_code(1) ], compile_and_run, [''])
 
-test('allocLimit4', [ extra_run_opts('+RTS -xq300k -RTS') ],
+test('allocLimit4', [ extra_run_opts('+RTS -xq300k -RTS'),
+                      # ghci consumes part of set limit at startup
+                      omit_ways(['ghci']) ],
                     compile_and_run, [''])
 
 # -----------------------------------------------------------------------------
diff --git a/testsuite/tests/concurrent/should_run/allocLimit4.hs b/testsuite/tests/concurrent/should_run/allocLimit4.hs
index b589ffa..842ad1c 100644
--- a/testsuite/tests/concurrent/should_run/allocLimit4.hs
+++ b/testsuite/tests/concurrent/should_run/allocLimit4.hs
@@ -8,6 +8,7 @@ import Control.Monad
 
 -- check that +RTS -xq is doing the right thing: the test requires
 -- +RTS -xq300k
+-- Test does not work in GHCi as it load A Lot Of Things at start
 
 main = do
   m <- newEmptyMVar
@@ -19,7 +20,7 @@ main = do
          case e of
            Left AllocationLimitExceeded{} -> do
              c <- getAllocationCounter
-             when (c < 250*1024 || c > 350*1024) $ fail "wrong limit grace"
+             when (c < 250*1024 || c > 350*1024) $ fail $ "wrong limit grace: " ++ show c
              print (length [2..])
            Right _ ->
              fail "didn't catch AllocationLimitExceeded"



More information about the ghc-commits mailing list