[commit: ghc] master: Disable -fghci-leak-check in DEBUG mode (6d55e36)
git at git.haskell.org
git at git.haskell.org
Sun Jul 15 01:28:04 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6d55e36f6d4b71402b3a27cd466d237034d3a5b8/ghc
>---------------------------------------------------------------
commit 6d55e36f6d4b71402b3a27cd466d237034d3a5b8
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date: Sat Jul 14 15:27:48 2018 -0400
Disable -fghci-leak-check in DEBUG mode
The DEBUG compiler's GHCi still leaks. This commit suppresses
testsuite failures due to this leak. See #15372.
>---------------------------------------------------------------
6d55e36f6d4b71402b3a27cd466d237034d3a5b8
testsuite/config/ghc | 2 +-
testsuite/driver/testlib.py | 3 ++-
testsuite/tests/ghci/scripts/T9293.stdout | 4 ----
testsuite/tests/ghci/scripts/all.T | 16 ++++++++++++++--
testsuite/tests/ghci/scripts/ghci057.stdout | 4 ----
5 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index f41f372..a850be9 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -80,7 +80,7 @@ config.way_flags = {
'prof_no_auto' : ['-prof', '-static', '-fasm'],
'profasm' : ['-O', '-prof', '-static', '-fprof-auto'],
'profthreaded' : ['-O', '-prof', '-static', '-fprof-auto', '-threaded'],
- 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fghci-leak-check', '+RTS', '-I0.1', '-RTS'],
+ 'ghci' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '+RTS', '-I0.1', '-RTS'] + (['-fghci-leak-check'] if not config.compiler_debugged else []),
'sanity' : ['-debug'],
'threaded1' : ['-threaded', '-debug'],
'threaded1_ls' : ['-threaded', '-debug'],
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index dac2684..f7863c3 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -970,8 +970,9 @@ def ghci_script( name, way, script):
# We pass HC and HC_OPTS as environment variables, so that the
# script can invoke the correct compiler by using ':! $HC $HC_OPTS'
- cmd = ('HC={{compiler}} HC_OPTS="{flags}" {{compiler}} {flags} {way_flags}'
+ cmd = ('HC={{compiler}} HC_OPTS="{flags}" {{compiler}} {way_flags} {flags}'
).format(flags=flags, way_flags=way_flags)
+ # NB: put way_flags before flags so that flags in all.T can overrie others
getTestOpts().stdin = script
return simple_run( name, way, cmd, getTestOpts().extra_run_opts )
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout b/testsuite/tests/ghci/scripts/T9293.stdout
index 4fdd350..2e5adc4 100644
--- a/testsuite/tests/ghci/scripts/T9293.stdout
+++ b/testsuite/tests/ghci/scripts/T9293.stdout
@@ -10,7 +10,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -30,7 +29,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -49,7 +47,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -70,7 +67,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 8954594..b054be9 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -1,5 +1,12 @@
# coding=utf8
+# Note [Disabling ghci-leak-check]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# The -fno-ghci-leak-check is because this test prints the current GHC settings
+# and the ghci-leak-check is turned off in DEBUG mode. See #15372. So we need to
+# turn it off in non-DEBUG mode, too, so that one stdout works for both modes.
+# After #15372 is fully fixed, these "extra_hc_opts" should be removed.
+
test('ghci001', combined_output, ghci_script, ['ghci001.script'])
test('ghci002', combined_output, ghci_script, ['ghci002.script'])
test('ghci003', combined_output, ghci_script, ['ghci003.script'])
@@ -91,7 +98,9 @@ test('ghci056',
extra_run_opts('ghci056_c.o')],
ghci_script, ['ghci056.script'])
-test('ghci057', normal, ghci_script, ['ghci057.script'])
+test('ghci057', extra_hc_opts("-fno-ghci-leak-check"), ghci_script, ['ghci057.script'])
+ # See Note [Disabling ghci-leak-check]
+
test('ghci060', normal, ghci_script, ['ghci060.script'])
test('ghci061', normal, ghci_script, ['ghci061.script'])
test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']),
@@ -190,7 +199,10 @@ test('T9181', normal, ghci_script, ['T9181.script'])
test('T9086b', normal, ghci_script, ['T9086b.script'])
test('T9140', combined_output, ghci_script, ['T9140.script'])
test('T9658', normal, ghci_script, ['T9658.script'])
-test('T9293', extra_files(['ghci057.hs']), ghci_script, ['T9293.script'])
+
+test('T9293', [extra_hc_opts('-fno-ghci-leak-check'), extra_files(['ghci057.hs'])], ghci_script, ['T9293.script'])
+ # See Note [Disabling ghci-leak-check]
+
test('T9762',
[ unless(have_dynamic(),skip)
, pre_cmd('$MAKE -s --no-print-directory T9762_prep')
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout
index 4fdd350..2e5adc4 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stdout
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout
@@ -10,7 +10,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -30,7 +29,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -49,7 +47,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
@@ -70,7 +67,6 @@ other dynamic, non-language, flag settings:
-fignore-optim-changes
-fignore-hpc-changes
-fno-ghci-history
- -fghci-leak-check
-fimplicit-import-qualified
-fshow-warning-groups
warning settings:
More information about the ghc-commits
mailing list