* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
@ 2021-08-11 19:46 ` redi at gcc dot gnu.org
2021-08-11 19:51 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 19:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-11
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
2021-08-11 19:46 ` [Bug testsuite/101866] " redi at gcc dot gnu.org
@ 2021-08-11 19:51 ` redi at gcc dot gnu.org
2021-08-11 19:51 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If the 32 bits read from /dev/random by reseed() happen to equal 99u then
there's a 100% chance that the values will be the same.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
2021-08-11 19:46 ` [Bug testsuite/101866] " redi at gcc dot gnu.org
2021-08-11 19:51 ` redi at gcc dot gnu.org
@ 2021-08-11 19:51 ` redi at gcc dot gnu.org
2021-08-11 22:46 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
` (2 preceding siblings ...)
2021-08-11 19:51 ` redi at gcc dot gnu.org
@ 2021-08-11 22:46 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:46 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-11 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:93f1dbc7cdcc4b31ea4061efb4c2acf2d4f81eb8
commit r12-2866-g93f1dbc7cdcc4b31ea4061efb4c2acf2d4f81eb8
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Aug 11 22:11:19 2021 +0100
libstdc++: Fix test that fails randomly [PR101866]
This test assumes that the same sequence of three values cannot occur,
which is incorect. It's unlikely, but not impossible.
Perform the check in a loop, so that in the unlikely event of an
identical sequence, we retry. If the library code is buggy it will keep
producing the same sequence and the test will time out. If the code is
working correctly then we will usually break out of the loop after one
iteration, or very rarely after two or three.
libstdc++-v3/ChangeLog:
PR libstdc++/101866
* testsuite/experimental/random/randint.cc: Loop and retry if
reseed() produces the same sequence.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
` (3 preceding siblings ...)
2021-08-11 22:46 ` cvs-commit at gcc dot gnu.org
@ 2021-08-11 22:46 ` redi at gcc dot gnu.org
2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk, but I'll backport it too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
` (4 preceding siblings ...)
2021-08-11 22:46 ` redi at gcc dot gnu.org
@ 2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-11 22:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:6e3647c98e474d0f204061859996356e6af5ae8d
commit r11-8854-g6e3647c98e474d0f204061859996356e6af5ae8d
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Aug 11 22:11:19 2021 +0100
libstdc++: Fix test that fails randomly [PR101866]
This test assumes that the same sequence of three values cannot occur,
which is incorect. It's unlikely, but not impossible.
Perform the check in a loop, so that in the unlikely event of an
identical sequence, we retry. If the library code is buggy it will keep
producing the same sequence and the test will time out. If the code is
working correctly then we will usually break out of the loop after one
iteration, or very rarely after two or three.
libstdc++-v3/ChangeLog:
PR libstdc++/101866
* testsuite/experimental/random/randint.cc: Loop and retry if
reseed() produces the same sequence.
(cherry picked from commit 93f1dbc7cdcc4b31ea4061efb4c2acf2d4f81eb8)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
` (5 preceding siblings ...)
2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
@ 2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:54 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-11 22:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:f1318b1d317b529cdd474a7660a82d47b228a054
commit r10-10032-gf1318b1d317b529cdd474a7660a82d47b228a054
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Aug 11 22:11:19 2021 +0100
libstdc++: Fix test that fails randomly [PR101866]
This test assumes that the same sequence of three values cannot occur,
which is incorect. It's unlikely, but not impossible.
Perform the check in a loop, so that in the unlikely event of an
identical sequence, we retry. If the library code is buggy it will keep
producing the same sequence and the test will time out. If the code is
working correctly then we will usually break out of the loop after one
iteration, or very rarely after two or three.
libstdc++-v3/ChangeLog:
PR libstdc++/101866
* testsuite/experimental/random/randint.cc: Loop and retry if
reseed() produces the same sequence.
(cherry picked from commit 93f1dbc7cdcc4b31ea4061efb4c2acf2d4f81eb8)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
` (6 preceding siblings ...)
2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
@ 2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
2021-08-11 22:54 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-11 22:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:326a020be21aeec77eab9a7247c0591c56745b37
commit r9-9670-g326a020be21aeec77eab9a7247c0591c56745b37
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Aug 11 22:11:19 2021 +0100
libstdc++: Fix test that fails randomly [PR101866]
This test assumes that the same sequence of three values cannot occur,
which is incorect. It's unlikely, but not impossible.
Perform the check in a loop, so that in the unlikely event of an
identical sequence, we retry. If the library code is buggy it will keep
producing the same sequence and the test will time out. If the code is
working correctly then we will usually break out of the loop after one
iteration, or very rarely after two or three.
libstdc++-v3/ChangeLog:
PR libstdc++/101866
* testsuite/experimental/random/randint.cc: Loop and retry if
reseed() produces the same sequence.
(cherry picked from commit 93f1dbc7cdcc4b31ea4061efb4c2acf2d4f81eb8)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/101866] libstdc++-v3/testsuite/experimental/random/randint.cc fails
2021-08-11 19:41 [Bug testsuite/101866] New: libstdc++-v3/testsuite/experimental/random/randint.cc fails seurer at gcc dot gnu.org
` (7 preceding siblings ...)
2021-08-11 22:52 ` cvs-commit at gcc dot gnu.org
@ 2021-08-11 22:54 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-11 22:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |9.5
Status|ASSIGNED |RESOLVED
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 9.5, 10.4 and 11.3, thanks for noticing the failures.
^ permalink raw reply [flat|nested] 10+ messages in thread