Fix failure in setnumcapabilities001 (#12728)
authorSimon Marlow <marlowsd@gmail.com>
Fri, 21 Oct 2016 16:02:57 +0000 (12:02 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 22 Oct 2016 16:20:59 +0000 (12:20 -0400)
commitacc98510c5e32474b0bba9fba54e78df2b11078c
treec43e4c109c2759ac680ee907696f2d3bb71fd76e
parentf41a8a369796985a75dd618b969292e1e7033112
Fix failure in setnumcapabilities001 (#12728)

The value of enabled_capabilities can change across a call to
requestSync(), and we were erroneously using an old value, causing
things to go wrong later.  It manifested as an assertion failure, I'm
not sure whether there are worse consequences or not, but we should
get this fix into 8.0.2 anyway.

The failure didn't happen for me because it only shows up on machines
with fewer than 4 processors, due to the new logic to enable -qn
automatically.  I've bumped the test parameter 8 to make it more
likely to exercise that code.

Test Plan: Ran setnumcapabilities001 many times

Reviewers: niteria, austin, erikd, rwbarton, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2617

GHC Trac Issues: #12728
rts/Schedule.c
testsuite/tests/concurrent/should_run/all.T