[Git][ghc/ghc][master] 8 commits: testsuite: Skip dynamicToo006 when dynamic linking is not available
Marge Bot
gitlab at gitlab.haskell.org
Fri Jun 21 17:32:40 UTC 2019
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
2485c08a by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Skip dynamicToo006 when dynamic linking is not available
This was previously failling on Windows.
- - - - -
aa516431 by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Mark T3372 as fragile on Windows
On Windows we must lock package databases even when opening for
read-only access. This means that concurrent GHC sessions are very
likely to fail with file lock contention.
See #16773.
- - - - -
2eedb120 by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Add stderr output for UnsafeInfered02 on Windows
This test uses TemplateHaskell causing GHC to build dynamic objects on
platforms where dynamic linking is available. However, Windows doesn't support
dynamic linking. Consequently the test would fail on Windows with:
```patch
--- safeHaskell/safeInfered/UnsafeInfered02.run/UnsafeInfered02.stderr.normalised 2019-06-04 15:10:10.521594200 +0000
+++ safeHaskell/safeInfered/UnsafeInfered02.run/UnsafeInfered02.comp.stderr.normalised 2019-06-04 15:10:10.523546200 +0000
@@ -1,5 +1,5 @@
-[1 of 2] Compiling UnsafeInfered02_A ( UnsafeInfered02_A.hs, UnsafeInfered02_A.o, UnsafeInfered02_A.dyn_o )
-[2 of 2] Compiling UnsafeInfered02 ( UnsafeInfered02.hs, UnsafeInfered02.o, UnsafeInfered02.dyn_o )
+[1 of 2] Compiling UnsafeInfered02_A ( UnsafeInfered02_A.hs, UnsafeInfered02_A.o )
+[2 of 2] Compiling UnsafeInfered02 ( UnsafeInfered02.hs, UnsafeInfered02.o )
UnsafeInfered02.hs:4:1:
UnsafeInfered02_A: Can't be safely imported!
```
The other approach I considered for this issue is to pass `-v0` to GHC.
However, I felt we should probably do this consistently for all of the tests in
this directory and this would take more time than I currently have.
- - - - -
3967d13a by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Mark OldModLocation as broken on Windows
Strangely the path it emits contains duplicate path delimiters (#16772),
```patch
--- ghc-api/downsweep/OldModLocation.run/OldModLocation.stderr.normalised 2019-06-04 14:40:26.326075000 +0000
+++ ghc-api/downsweep/OldModLocation.run/OldModLocation.run.stderr.normalised 2019-06-04 14:40:26.328029200 +0000
@@ -1 +1 @@
-[Just "A.hs",Just "mydir/B.hs"]
+[Just "A.hs",Just "mydir//B.hs"]
```
- - - - -
31f2ea68 by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Mark T7170 as broken on Windows
Due to #16801.
- - - - -
7bd1c3e1 by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Mark T7702 as broken on Windows
Due to #16799.
- - - - -
84900724 by Ben Gamari at 2019-06-21T17:32:34Z
testsuite: Mark T15633a and T15633b as fragile on Windows
As noted in #16813, these tests seem to be fragile on Windows.
- - - - -
49fff41d by Ben Gamari at 2019-06-21T17:32:34Z
linker: Disable code unloading
As noted in #16841, there are currently a variety of bugs in the
unloading logic. These only affect Windows since code unloading is
disabled on Linux, where we build with `GhcDynamic=YES` by default.
In the interest of getting the tree green on Windows disable code
unloading until the issues are resolved.
- - - - -
9 changed files:
- compiler/ghci/Linker.hs
- libraries/ghc-boot/GHC/PackageDb.hs
- testsuite/tests/driver/dynamicToo/dynamicToo006/all.T
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/ghc-api/downsweep/all.T
- testsuite/tests/ghci/linking/dyn/all.T
- testsuite/tests/ghci/should_run/all.T
- + testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr-mingw32
- testsuite/tests/simplCore/should_compile/all.T
Changes:
=====================================
compiler/ghci/Linker.hs
=====================================
@@ -1123,7 +1123,10 @@ unload_wkr hsc_env keep_linkables pls at PersistentLinkerState{..} = do
-- We don't do any cleanup when linking objects with the
-- dynamic linker. Doing so introduces extra complexity for
-- not much benefit.
- | otherwise
+
+ -- Code unloading currently disabled due to instability.
+ -- See #16841.
+ | False -- otherwise
= mapM_ (unloadObj hsc_env) [f | DotO f <- linkableUnlinked lnk]
-- The components of a BCO linkable may contain
-- dot-o files. Which is very confusing.
@@ -1131,6 +1134,7 @@ unload_wkr hsc_env keep_linkables pls at PersistentLinkerState{..} = do
-- But the BCO parts can be unlinked just by
-- letting go of them (plus of course depopulating
-- the symbol table which is done in the main body)
+ | otherwise = return () -- see #16841
{- **********************************************************************
=====================================
libraries/ghc-boot/GHC/PackageDb.hs
=====================================
@@ -387,6 +387,8 @@ decodeFromFile :: FilePath -> DbOpenMode mode t -> Get pkgs ->
IO (pkgs, DbOpenMode mode PackageDbLock)
decodeFromFile file mode decoder = case mode of
DbOpenReadOnly -> do
+ -- Note [Locking package database on Windows]
+ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- When we open the package db in read only mode, there is no need to acquire
-- shared lock on non-Windows platform because we update the database with an
-- atomic rename, so readers will always see the database in a consistent
=====================================
testsuite/tests/driver/dynamicToo/dynamicToo006/all.T
=====================================
@@ -1,2 +1,3 @@
-test('dynamicToo006', [normalise_slashes, extra_files(['Main.hs'])],
+test('dynamicToo006',
+ [normalise_slashes, extra_files(['Main.hs']), unless(have_dynamic(), skip)],
run_command, ['$MAKE -s main --no-print-director'])
=====================================
testsuite/tests/ffi/should_run/all.T
=====================================
@@ -169,7 +169,10 @@ test('ffi_parsing_001', [omit_ways(['ghci'])], compile_and_run,
test('capi_value', [omit_ways(['ghci'])], compile_and_run, ['capi_value_c.c'])
-test('T7170', exit_code(1), compile_and_run, [''])
+test('T7170',
+ [when(opsys('mingw32'), fragile(16801)),
+ exit_code(1)],
+ compile_and_run, [''])
test('T4012', [expect_broken_for(7388, ['ghci'])], multimod_compile_and_run,
['T4012', ''])
=====================================
testsuite/tests/ghc-api/downsweep/all.T
=====================================
@@ -9,6 +9,7 @@ test('PartialDownsweep',
test('OldModLocation',
[ extra_run_opts('"' + config.libdir + '"')
+ , when(opsys('mingw32'), expect_broken(16772))
],
compile_and_run,
['-package ghc'])
=====================================
testsuite/tests/ghci/linking/dyn/all.T
=====================================
@@ -45,5 +45,11 @@ test('big-obj', [extra_files(['big-obj-c.c', 'big-obj.hs']),
unless(doing_ghci, skip), unless(opsys('mingw32'), skip)],
makefile_test, ['big-obj'])
-test('T3372', [unless(doing_ghci, skip), extra_run_opts('"' + config.libdir + '"')],
+test('T3372',
+ [unless(doing_ghci, skip),
+ extra_run_opts('"' + config.libdir + '"'),
+ # Concurrent GHC sessions is fragile on Windows since we must lock the
+ # package database even for read-only access.
+ # See Note [Locking package database on Windows] in GHC.PackageDb
+ when(opsys('mingw32'), fragile(16773))],
compile_and_run, ['-package ghc'])
=====================================
testsuite/tests/ghci/should_run/all.T
=====================================
@@ -46,7 +46,7 @@ test('T15369', just_ghci, ghci_script, ['T15369.script'])
test('T15633a',
[extra_files(['tc-plugin-ghci/']),
- when(opsys('mingw32'), multi_cpu_race),
+ when(opsys('mingw32'), [multi_cpu_race, fragile(16813)]),
only_ways(['ghci']),
pre_cmd('$MAKE -s --no-print-directory -C tc-plugin-ghci package.plugins01 TOP={top}'),
extra_hc_opts("-package-db tc-plugin-ghci/pkg.plugins01/local.package.conf -fplugin TcPluginGHCi")
@@ -55,7 +55,7 @@ test('T15633a',
test('T15633b',
[extra_files(['tc-plugin-ghci/']),
- when(opsys('mingw32'), multi_cpu_race),
+ when(opsys('mingw32'), [multi_cpu_race, fragile(16813)]),
only_ways(['ghci']),
pre_cmd('$MAKE -s --no-print-directory -C tc-plugin-ghci package.plugins01 TOP={top}'),
extra_hc_opts("-package-db tc-plugin-ghci/pkg.plugins01/local.package.conf")
=====================================
testsuite/tests/safeHaskell/safeInfered/UnsafeInfered02.stderr-mingw32
=====================================
@@ -0,0 +1,7 @@
+[1 of 2] Compiling UnsafeInfered02_A ( UnsafeInfered02_A.hs, UnsafeInfered02_A.o )
+[2 of 2] Compiling UnsafeInfered02 ( UnsafeInfered02.hs, UnsafeInfered02.o )
+
+UnsafeInfered02.hs:4:1: error:
+ UnsafeInfered02_A: Can't be safely imported!
+ The module itself isn't safe.
+
=====================================
testsuite/tests/simplCore/should_compile/all.T
=====================================
@@ -144,6 +144,7 @@ test('T7702',
# a large effect on allocation which is hard to separate from the
# allocation done by the plugin... but a regression allocates > 90mb
collect_compiler_stats('peak_megabytes_allocated',70),
+ when(opsys('mingw'), expect_broken_for(16799, ['normal']))
],
compile,
['-v0 -package-db T7702plugin/pkg.T7702/local.package.conf -fplugin T7702Plugin -package T7702plugin ' + config.plugin_way_flags])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/c311277bf640a4aeb929f3080eaaf656c0e0611c...49fff41d0385ac1ad80a1a8b2ae33e765e89a088
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/c311277bf640a4aeb929f3080eaaf656c0e0611c...49fff41d0385ac1ad80a1a8b2ae33e765e89a088
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190621/00929264/attachment-0001.html>
More information about the ghc-commits
mailing list