[Git][ghc/ghc][wip/T22484] 2 commits: testsuite: Mark unpack_sums_6 as fragile due to #22504

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Wed Nov 23 14:02:31 UTC 2022



Ben Gamari pushed to branch wip/T22484 at Glasgow Haskell Compiler / GHC


Commits:
ab19f780 by Ben Gamari at 2022-11-23T09:02:28-05:00
testsuite: Mark unpack_sums_6 as fragile due to #22504

This test is explicitly dependent upon runtime, which is generally not
appropriate given that the testsuite is run in parallel and generally
saturates the CPU.

- - - - -
c2bb5c6f by Ben Gamari at 2022-11-23T09:02:28-05:00
testsuite: Don't use grep -q in unpack_sums_7

`grep -q` closes stdin as soon as it finds the pattern it is looking
for, resulting in #22484.

- - - - -


5 changed files:

- testsuite/tests/unboxedsums/Makefile
- testsuite/tests/unboxedsums/all.T
- testsuite/tests/unboxedsums/unpack_sums_7.hs
- − testsuite/tests/unboxedsums/unpack_sums_7.stderr
- + testsuite/tests/unboxedsums/unpack_sums_7.stdout


Changes:

=====================================
testsuite/tests/unboxedsums/Makefile
=====================================
@@ -6,6 +6,6 @@ include $(TOP)/mk/test.mk
 
 unpack_sums_7:
 	$(RM) -f unpack_sums_7.o unpack_sums_7.hi
-	'$(TEST_HC)' $(TEST_HC_OPTS) -c unpack_sums_7.hs  -O -dsuppress-all -ddump-simpl | grep -q '\(# |_ #\)'
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c unpack_sums_7.hs  -O -dsuppress-all -dsuppress-uniques -ddump-simpl | grep '\(# |_ #\)'
 	# This is a test to check for the presence of an unboxed sum in the core for a program using UNPACK
 	# on a sum type which is evidence that the field has been correctly unpacked.


=====================================
testsuite/tests/unboxedsums/all.T
=====================================
@@ -45,8 +45,8 @@ test('unpack_sums_2', normal, compile, ['-O'])
 test('unpack_sums_3', normal, compile_and_run, ['-O'])
 test('unpack_sums_4', normal, compile_and_run, ['-O'])
 test('unpack_sums_5', normal, compile, ['-O'])
-test('unpack_sums_6', normal, compile_and_run, ['-O'])
-test('unpack_sums_7', [], makefile_test, [])
+test('unpack_sums_6', fragile(22504), compile_and_run, ['-O'])
+test('unpack_sums_7', normal, makefile_test, [])
 test('unpack_sums_8', normal, compile_and_run, [""])
 test('unpack_sums_9', normal, compile, [""])
 


=====================================
testsuite/tests/unboxedsums/unpack_sums_7.hs
=====================================
@@ -1,6 +1,3 @@
--- NB: Compiling this module throws an exception involving Weak# at the end of compilation.
--- This is unrelated to unpacked sums but we need to include the error in the expected output for the test to pass.
-
 module UnpackedSums7 where
 
 data T = MkT {-# UNPACK #-} !MI


=====================================
testsuite/tests/unboxedsums/unpack_sums_7.stderr deleted
=====================================
@@ -1,2 +0,0 @@
-Exception during Weak# finalization (ignored): <stdout>: hFlush: resource vanished (Broken pipe)
-Exception during Weak# finalization (ignored): <stdout>: hFlush: resource vanished (Broken pipe)


=====================================
testsuite/tests/unboxedsums/unpack_sums_7.stdout
=====================================
@@ -0,0 +1,2 @@
+             JI unbx -> (# |_ #) unbx
+t = MkT ((# |_ #) t1)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1008d9b9b8353ac0bcc9bdf4cb478a78ec644c85...c2bb5c6f54e0f09a38960142bf6f75acc531d17a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1008d9b9b8353ac0bcc9bdf4cb478a78ec644c85...c2bb5c6f54e0f09a38960142bf6f75acc531d17a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221123/1fd92a74/attachment-0001.html>


More information about the ghc-commits mailing list