diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/profiling/should_run/Makefile | 8 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/T15897.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/all.T | 5 |
3 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_run/Makefile b/testsuite/tests/profiling/should_run/Makefile index d52bda1918..19a682fb97 100644 --- a/testsuite/tests/profiling/should_run/Makefile +++ b/testsuite/tests/profiling/should_run/Makefile @@ -22,3 +22,11 @@ T14257: ./T14257 +RTS -hc # Make sure that samples are monotonically increasing awk 'BEGIN{t=0} /BEGIN_SAMPLE/{if ($$2 < t) print "uh oh", $$t, $$0; t=$$2;}' T14257.hp + +.PHONY: T15897 +T15897: + # The bug is caught by an assertion so we run the tests with debug runtime + # and ignore the outputs + "$(TEST_HC)" -prof -fprof-auto -debug -v0 T15897.hs + ./T15897 10000000 +RTS -s -hc 2>/dev/null + ./T15897 10000000 +RTS -s -hr 2>/dev/null diff --git a/testsuite/tests/profiling/should_run/T15897.hs b/testsuite/tests/profiling/should_run/T15897.hs new file mode 100644 index 0000000000..b004cd1248 --- /dev/null +++ b/testsuite/tests/profiling/should_run/T15897.hs @@ -0,0 +1,7 @@ +import Control.Monad +import Data.IORef +import System.Environment + +main = do + [n] <- getArgs + replicateM (read n) (newIORef [1,2,3]) diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 968d678164..9bca86b274 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -145,3 +145,8 @@ test('toplevel_scc_1', test('T12962', [], compile_and_run, ['']) test('T14257', [], run_command, ['$MAKE -s --no-print-directory T14257']) + +test('T15897', + [extra_ways(['profasm']), only_ways(['profasm']), run_timeout_multiplier(2)], + run_command, + ['$MAKE -s --no-print-directory T15897']) |