On 25/03/21 4:29 pm, Jonathan Wakely wrote:
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).


Yes, I also realized this empty container potential issue.

Please go ahead with any of your patches, I'll just adapt if you push first.

I will commit in a couple of hours.

François

Reply via email to