c7fc73ee45
The testsuite utilities that use random numbers use a default-constructed mersenne_twister_engine, meaning the values are reproducable. This adds support for seeding them, controlledby an environment variable. Defining GLIBCXX_SEED_TEST_RNG=val in the environment will cause the engines to be seeded with atoi(val) if that is non-zero, or with a value read from std::random_device otherwise. Running with different seeds revealed some bugs in the tests, where a randomly selected iterator was past-the-end (which can't be erased), or where the randomly populated container was empty, and then we tried to remove elements from it unconditionally. libstdc++-v3/ChangeLog: * testsuite/util/exception/safety.h (setup_base::generate): Support seeding random engine. (erase_point, erase_range): Adjust range of random numbers to ensure dereferenceable iterators are used where required. (generation_prohibited::run): Do not try to erase from empty containers. * testsuite/util/testsuite_containergen.h (test_containers): Support seeding random engine. |
||
---|---|---|
.. | ||
config | ||
doc | ||
include | ||
libsupc++ | ||
po | ||
python | ||
scripts | ||
src | ||
testsuite | ||
acinclude.m4 | ||
aclocal.m4 | ||
ChangeLog | ||
ChangeLog-1998 | ||
ChangeLog-1999 | ||
ChangeLog-2000 | ||
ChangeLog-2001 | ||
ChangeLog-2002 | ||
ChangeLog-2003 | ||
ChangeLog-2004 | ||
ChangeLog-2005 | ||
ChangeLog-2006 | ||
ChangeLog-2007 | ||
ChangeLog-2008 | ||
ChangeLog-2009 | ||
ChangeLog-2010 | ||
ChangeLog-2011 | ||
ChangeLog-2012 | ||
ChangeLog-2013 | ||
ChangeLog-2014 | ||
ChangeLog-2015 | ||
ChangeLog-2016 | ||
ChangeLog-2017 | ||
ChangeLog-2018 | ||
ChangeLog-2019 | ||
ChangeLog-2020 | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.host | ||
crossconfig.m4 | ||
fragment.am | ||
linkage.m4 | ||
Makefile.am | ||
Makefile.in | ||
README |
file: libstdc++-v3/README New users may wish to point their web browsers to the file index.html in the 'doc/html' subdirectory. It contains brief building instructions and notes on how to configure the library in interesting ways.