summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-13 20:17:20 -0400
committerBen Gamari <ben@smart-cactus.org>2019-11-18 12:28:43 -0500
commitf0bf1de9b57cf0899861d9398227a31537306fde (patch)
treefaab224991227cd03614f67fdab9ce031db512e1
parentec962cb95fb6f288f9a449f3c5da8998afb636ba (diff)
downloadhaskell-f0bf1de9b57cf0899861d9398227a31537306fde.tar.gz
testsuite: Introduce concurrent_ways set
Previously we just tested for the threaded2 when determining whether to skip tests which are fragile under concurrent execution. However, this isn't the only way which is concurrent.
-rw-r--r--testsuite/config/ghc9
-rw-r--r--testsuite/tests/concurrent/should_run/all.T10
2 files changed, 12 insertions, 7 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 24294da119..a617fe2dc8 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -115,10 +115,10 @@ config.way_rts_flags = {
'sanity' : ['-DS'],
'threaded1' : [],
'threaded1_ls' : ['-ls'],
- 'threaded2' : ['-N2 -ls'],
+ 'threaded2' : ['-N2', '-ls'],
'threaded2_hT' : ['-N2', '-hT'],
'hpc' : [],
- 'prof_hc_hb' : ['-hc -hbvoid'],
+ 'prof_hc_hb' : ['-hc', '-hbvoid'],
'prof_hb' : ['-hb'],
'prof_hd' : ['-hd'],
'prof_hy' : ['-hy'],
@@ -144,6 +144,11 @@ prof_ways = [x[0] for x in config.way_flags.items()
threaded_ways = [x[0] for x in config.way_flags.items()
if '-threaded' in x[1] or 'ghci' == x[0]]
+# Ways which run with multiple capabilities
+concurrent_ways = [name for name, flags in config.way_flags.items()
+ if '-threaded' in flags or 'ghci' == name
+ if '-N2' in config.way_rts_flags.get(name, [])]
+
opt_ways = [x[0] for x in config.way_flags.items()
if '-O' in x[1]]
diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T
index 33c21e7d3f..06a8e6cc37 100644
--- a/testsuite/tests/concurrent/should_run/all.T
+++ b/testsuite/tests/concurrent/should_run/all.T
@@ -17,8 +17,8 @@ test('conc069a', only_threaded_ways, compile_and_run, [''])
# those for now.
test('conc070', only_threaded_ways, compile_and_run, [''])
-test('conc071', omit_ways(['threaded2']), compile_and_run, [''])
-test('conc072', only_ways(['threaded2']), compile_and_run, [''])
+test('conc071', omit_ways(concurrent_ways), compile_and_run, [''])
+test('conc072', only_ways(concurrent_ways), compile_and_run, [''])
test('conc073', normal, compile_and_run, [''])
# vector code must get inlined to become non-allocating
@@ -67,7 +67,7 @@ test('allowinterrupt001', normal, compile_and_run, [''])
# try hard to provoke the error by running the test 100 times
test('T5558',
- [ only_ways(['threaded2']),
+ [ only_ways(concurrent_ways),
cmd_wrapper(
lambda c: "for i in %s; do %s || break; done" %
(" ".join(str(i) for i in range(1,101)), c)) ],
@@ -89,7 +89,7 @@ test('T7970', normal, compile_and_run, [''])
test('AtomicPrimops', normal, compile_and_run, [''])
# test uses 2 threads and yield, scheduling can vary with threaded2
-test('threadstatus-9333', [fragile_for(16555, ['ghci']), omit_ways(['threaded2'])], compile_and_run, [''])
+test('threadstatus-9333', [fragile_for(16555, ['ghci']), omit_ways(concurrent_ways)], compile_and_run, [''])
test('T9379', normal, compile_and_run, [''])
@@ -133,7 +133,7 @@ test('conc013', normal, compile_and_run, [''])
test('conc014', normal, compile_and_run, [''])
test('conc015', normal, compile_and_run, [''])
test('conc015a', normal, compile_and_run, [''])
-test('conc016', omit_ways(['threaded2']), # see comment in conc016.hs
+test('conc016', omit_ways(concurrent_ways), # see comment in conc016.hs
compile_and_run, [''])
test('conc017', normal, compile_and_run, [''])
test('conc017a', normal, compile_and_run, [''])