diff options
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/concurrent/should_run/all.T b/testsuite/tests/ghc-regress/concurrent/should_run/all.T index deefcd487b..2a9bafc520 100644 --- a/testsuite/tests/ghc-regress/concurrent/should_run/all.T +++ b/testsuite/tests/ghc-regress/concurrent/should_run/all.T @@ -41,6 +41,8 @@ test('mask002', omit_ways(['ghci']), compile_and_run, ['']) test('async001', normal, compile_and_run, ['']) +test('numsparks001', only_ways(['threaded1']), compile_and_run, ['']) + # ----------------------------------------------------------------------------- # These tests we only do for a full run diff --git a/testsuite/tests/ghc-regress/concurrent/should_run/numsparks001.hs b/testsuite/tests/ghc-regress/concurrent/should_run/numsparks001.hs new file mode 100644 index 0000000000..f28bf87d55 --- /dev/null +++ b/testsuite/tests/ghc-regress/concurrent/should_run/numsparks001.hs @@ -0,0 +1,11 @@ + +import GHC.Conc + +main = do + let x = length [1..100] + numSparks >>= print + x `par` numSparks >>= print + x `par` numSparks >>= print + x `par` numSparks >>= print + x `par` numSparks >>= print + diff --git a/testsuite/tests/ghc-regress/concurrent/should_run/numsparks001.stdout b/testsuite/tests/ghc-regress/concurrent/should_run/numsparks001.stdout new file mode 100644 index 0000000000..9dfcf39f5a --- /dev/null +++ b/testsuite/tests/ghc-regress/concurrent/should_run/numsparks001.stdout @@ -0,0 +1,5 @@ +0 +1 +2 +3 +4 |