2d5e1fc8

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Warn about one capability whenever tests would run at the same time

The warning to compile a test suite with -threaded -rtsopts
-with-rtsopts=-N fired whenever the thread count was left to the
capabilities and there was one of them. That missed the cases where the
thread count was asked for: a suite run with --jobs 4 on one capability
runs its tests one at a time just the same, and never exercises the
thread safety that tests running at the same time are there to find, so
it said nothing while the advice applied.

So ask both of the questions the advice depends on, in
oneCapabilityWarning. Is the RTS down to a single capability, which is
what -N raises? And would the suite use more than one if it had them,
which is all the advice buys? Synchronous would not, and neither would
an Asynchronous bound of a single test, so those stay quiet.

The advice is about how the suite is compiled rather than about the
machine it runs on, so a single processor, or a single core from nix, is
warned about too: a suite built without -N has one capability
everywhere, and staying quiet would hide that on exactly the small CI
runners where a suite is first run.

The message now names capabilities rather than CPU cores. That is what
it has always counted, and the two only looked alike while it fired for
the capability count alone: a suite told to use four threads on a
64-core machine, without -N, has one capability and 64 cores.
GitHub

Total

2m38s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 7m29s 6s 6s 7m35s 7m29s
Eval 7m35s 2m31s 2m31s 10m07s 1m15s
Build - - - - -
Suite 7m29s 2m37s 2m38s 10m07s 8m44s

Timeline

Config Eval Failed Retried Compressed gap
0s7m40s8m8m20s8m40s9m9m20s9m40s10m