Make the test for #11108 less fragile
authorTakano Akio <tak@anoak.io>
Mon, 5 Sep 2016 19:52:37 +0000 (15:52 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 5 Sep 2016 20:59:49 +0000 (16:59 -0400)
commita7a960e43c34e40e1656fa1505605f756a44bb71
tree4b57ff2da76b73667b7ad144ff52af9e5b9ba5b2
parent05b497ece50f508526d0906f675bdb4c8109d46a
Make the test for #11108 less fragile

This change should close #11108 by fixing the test case.

This commit fixes two issues:

* Make sure that each weak pointer we allocate has a constructor as the
  key, not a thunk. A failure to do so meant these weak pointers died
  prematurely on the 'ghci' WAY.

* Don't print anything in the finalizer, because they are not guaranteed
  to run.

Test Plan: validate

Reviewers: austin, simonmar, erikd, bgamari

Reviewed By: erikd, bgamari

Subscribers: thomie

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

GHC Trac Issues: #11108
testsuite/tests/rts/T11108.hs
testsuite/tests/rts/all.T