diff options
author | Sergei Trofimovich <siarheit@google.com> | 2015-06-19 22:54:15 +0100 |
---|---|---|
committer | Sergei Trofimovich <siarheit@google.com> | 2015-06-19 22:57:29 +0100 |
commit | 7d5a845365761c125e637cfa0c341b661a57a879 (patch) | |
tree | d15c2787510be396114f683aafc2ff9dd68397b3 /testsuite/tests/concurrent | |
parent | 440d1bc1f5fa4d31f1f7bc45f3f3485733509313 (diff) | |
download | haskell-7d5a845365761c125e637cfa0c341b661a57a879.tar.gz |
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@google.com>
Diffstat (limited to 'testsuite/tests/concurrent')
-rw-r--r-- | testsuite/tests/concurrent/should_run/all.T | 4 | ||||
-rw-r--r-- | 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 2d3ac2e376..3d059bdcf7 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 b589ffa4af..842ad1c110 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" |