testsuite: force plugin tests sequentially on Windows.

Authored by Phyx on Jul 1 2018, 5:58 AM.



Package registration does not seem to be thread-safe on
Windows. Placing the system under heavily load seems to
trigger registration failures even though they are all
different package-dbs. This makes the plugin tests
a bit flaky.

I think this is because on Windows we use pessimistic locks
while on Linux we use atomic file replacement.

On Windows ReplaceFile is atomic, just the metadata write
may not be. Since the metadata is not of importance
we should either switch over to ReplaceFile or
fix the locking code to not error out but wait.

For now however I have to force these 25 tests to run
serially in order to guarantee their correctness.

Test Plan


Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Phyx created this revision.Jul 1 2018, 5:58 AM
bgamari added inline comments.Jul 2 2018, 12:16 PM

What does "thread-safe" mean here? Do you rather mean "multiple-concurrent-process safe"? If so then this implies that Trac #13194 isn't actually fixed on Windows and should be reopened (and perhaps a reference added here).

Phyx added inline comments.Jul 2 2018, 12:24 PM

Oops, yes indeed I do mean multi process concurrent. These failures only show up when the system is under heavy load and it hits the plugin tests. You then get a framework failure as ghc bails out on the setup install command.

bgamari added inline comments.Jul 2 2018, 1:22 PM

Okay, do you think you could add a mention of Trac #13194 here in that case?

bgamari requested changes to this revision.Jul 2 2018, 1:22 PM
This revision now requires changes to proceed.Jul 2 2018, 1:22 PM
Phyx added inline comments.Jul 2 2018, 3:08 PM

sure, I'll update it in a bit.

Phyx updated this revision to Diff 17176.Jul 3 2018, 3:31 PM

update comments

Phyx marked 4 inline comments as done.Jul 3 2018, 3:34 PM
Phyx updated the Trac tickets for this revision.
Phyx updated this revision to Diff 17177.Jul 3 2018, 3:37 PM

correct issue number.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 18 2018, 3:27 PM
This revision was automatically updated to reflect the committed changes.