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

2m32s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 5m27s 0s 0s 5m27s 5m27s
Eval 5m27s 2m31s 2m31s 7m59s 1m16s
Build - - - - -
Suite 5m27s 2m32s 2m32s 7m59s 6m43s

Timeline

Config Eval Failed Retried Compressed gap
0s5m40s6m6m20s6m40s7m7m20s7m40s