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

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Nov 29 08:11:43 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
ab23dc5e by Ben Gamari at 2022-11-29T03:11:25-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.

- - - - -
def47dd3 by Ben Gamari at 2022-11-29T03:11:25-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/02e282ec8ab2fb3d28c754ca7967f79c70a48c4a...def47dd32491311289bff26230b664c895f178cc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/02e282ec8ab2fb3d28c754ca7967f79c70a48c4a...def47dd32491311289bff26230b664c895f178cc
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/20221129/5c785c24/attachment-0001.html>


More information about the ghc-commits mailing list