[PATCH] Complete __gnu_debug::basic_string
Jonathan Wakely
jwakely@redhat.com
Thu Mar 25 15:29:52 GMT 2021
On 25/03/21 14:48 +0000, Jonathan Wakely wrote:
>On 25/03/21 13:05 +0000, Jonathan Wakely wrote:
>>On 24/03/21 22:48 +0100, François Dumont wrote:
>>>I still need to find out why, when running test on
>>>__gnu_debug::basic_string after the std::basic_string one, the
>>>generate(sz) call always returns sz.
>>
>>The "random" generator will always return the same sequence of numbers
>>every time you run the test. It uses a default-constructed
>>std::mt19937 without a seed, so the sequence of random numbers is 100%
>>reproducable.
>
>This patch allows those random engines to be seeded, so that we can test
>with different random numbers.
>
>It's already found a bug:
>
>GLIBCXX_SEED_TEST_RNG=-941908610 make check RUNTESTFLAGS=conformance.exp=23_containers/forward_list/requirements/exception/generation_prohibited.cc
>
>Using random seed 3353058686
>FAIL: 23_containers/forward_list/requirements/exception/generation_prohibited.cc execution test
>
>We need to investigate that.
Oh, it's the same generate(sz) bug as you already found. But I've
found other bugs, e.g. with GLIBCXX_SEED_TEST_RNG=1908970375).
I think we should also add a check for non-empty containers to those
test functions, and ensure we don't try to erase from empty
containers (see attached).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 4801 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210325/8a340860/attachment-0001.bin>
More information about the Libstdc++
mailing list