gcc/libstdc++-v3
Jonathan Wakely c7fc73ee45 libstdc++: Allow seeding random engines in testsuite
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.
2021-03-25 18:21:19 +00:00
..
config libstdc++: Remove symbols for new std::call_once implementation [PR 99341] 2021-03-16 12:25:28 +00:00
doc libstdc++: Document library versioning for GCC 11 2021-02-25 15:35:59 +00:00
include libstdc++: Avoid accidental ADL when calling make_reverse_iterator 2021-03-23 16:34:42 +00:00
libsupc++ libstdc++: Implement LWG 3530 for concept-constrained comparisons 2021-03-10 15:27:06 +00:00
po
python libstdc++: Fix find_type helper to work consistently 2021-03-11 17:52:56 +00:00
scripts libstdc++: Add simd testsuite 2021-01-27 16:37:26 +00:00
src libstdc++: Remove symbols for new std::call_once implementation [PR 99341] 2021-03-16 12:25:28 +00:00
testsuite libstdc++: Allow seeding random engines in testsuite 2021-03-25 18:21:19 +00:00
acinclude.m4
aclocal.m4
ChangeLog Daily bump. 2021-03-24 00:16:25 +00:00
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 libstdc++: Fix typo in ChangeLog-2020 2021-01-13 11:02:13 +00:00
config.h.in
configure Update GNU/Hurd configure support 2021-01-05 16:04:14 -07:00
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.