[Bug libstdc++/90277] Debug Mode test failures
François Dumont
frs.dumont@gmail.com
Tue May 7 05:06:00 GMT 2019
Hi
   I just prefer to make the tests implementation-agnostic using reserve.
   I check that without the patch to initiate the hashtable with 11
buckets I reproduce the failures and that with this patch it is fine.
   PR libstdc++/90277
   * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
   (test01): Reserve for number of insertions to avoid rehash during test.
   * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
   (test01): Likewise.
   * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
   (test01): Likewise.
   (test02): Likewise.
   (test03): Likewise.
   I plan to commit it this evening if not told otherwise.
François
On 5/6/19 3:04 PM, redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90277
>
> --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> (In reply to François Dumont from comment #3)
>> As stated in my message this patch can be consider as a fix for this PR as
>> it reserve buckets for 11 buckets so iterators are not invalidated during
>> execution of the tests. You shouldn't have anymore failures, do you ?
>>
>> But maybe you would prefer to make those tests independent of this
>> implementation detail. I'll do that too.
> I think it's OK to rely on the detail as long as the tests make that explicit.
> A comment saying that they assume there's no rehashing would be OK, even better
> would be to use VERIFY to assert that the count doesn't change. If we make the
> tests actually verify there's no rehashing, then it's OK to assume no hashing
> :-)
>
> Currently it's just a silent assumption, which isn't even true any more.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr90277.patch
Type: text/x-patch
Size: 2110 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190507/bb164dba/attachment.bin>
More information about the Libstdc++
mailing list