Skip to content
Snippets Groups Projects
Commit aa516431 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

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.
parent 2485c08a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment