Add a perf test for #5536
authorIan Lynagh <igloo@earth.li>
Sat, 28 Jan 2012 22:22:38 +0000 (22:22 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 28 Jan 2012 22:22:38 +0000 (22:22 +0000)
testsuite/tests/perf/should_run/T5536.hs [new file with mode: 0644]
testsuite/tests/perf/should_run/all.T

diff --git a/testsuite/tests/perf/should_run/T5536.hs b/testsuite/tests/perf/should_run/T5536.hs
new file mode 100644 (file)
index 0000000..3259c46
--- /dev/null
@@ -0,0 +1,5 @@
+
+main :: IO ()
+main = do writeFile "T5536.data" (replicate 10000000 'a')
+          readFile "T5536.data" >>= putStr
+
index 122294c..fc1d579 100644 (file)
@@ -217,3 +217,19 @@ test('T5237',
      ],
     compile_and_run,
     ['-O ' + sse2_opts])
+
+test('T5536',
+     [if_wordsize(32,
+          stats_num_field('bytes allocated', 2480000000,
+                                             2510000000)),
+      if_wordsize(64,
+          stats_num_field('bytes allocated', 2480000000,
+                                             2510000000)),
+                           # expected value: 2492589480 (amd64/Linux)
+     extra_clean(['T5536.data']),
+     ignore_output,
+     only_ways(['normal'])
+     ],
+    compile_and_run,
+    ['-O'])
+