public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] require et random_device for cons token test
@ 2021-03-24  6:29 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2021-03-24  6:29 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:0af01746271a54d68dfcccd3cc16bd74bd70fbda

commit 0af01746271a54d68dfcccd3cc16bd74bd70fbda
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Tue Mar 23 09:28:10 2021 -0300

    require et random_device for cons token test
    
    On target systems that don't support any random_device, not even the
    default one, other random_device constructor tests are disabled by
    dg-require-effective-target random_device.  The token.cc also
    exercises the default constructor, in a way that doesn't expect an
    exception to be raised, but it's not guarded by the same requirement.
    
    Other potentially-raising ctors in token.cc expect exceptions and
    handle them, but the ("default")-constructed one does not, so the
    program terminates and the test fails without exercising the other
    constructor variants.
    
    This patch arranges to disable the test altogether when the
    random_device feature is not available.  A reasonable alternative
    would be to install a std::runtime_error handler around the test01
    body, so that we exercise at least the exception raising, but then
    test03 would have to be relaxed, since without even "default", it
    likely wouldn't meet the tested requirement there.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/26_numerics/random/random_device/cons/token.cc:
            Require effective target feature random_device.

Diff:
---
 libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
index defb8d58c58..105ae0ba877 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-require-effective-target random_device }
 // { dg-require-cstdint "" }
 //
 // 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] require et random_device for cons token test
@ 2021-03-24  9:07 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2021-03-24  9:07 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:0a5f899441bb67a245b6833ac399e678f8f42633

commit 0a5f899441bb67a245b6833ac399e678f8f42633
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Mar 24 05:50:36 2021 -0300

    require et random_device for cons token test
    
    On target systems that don't support any random_device, not even the
    default one, other random_device constructor tests are disabled by
    dg-require-effective-target random_device.  The token.cc also
    exercises the default constructor, in a way that doesn't expect an
    exception to be raised, but it's not guarded by the same requirement.
    
    Other potentially-raising ctors in token.cc expect exceptions and
    handle them, but the ("default")-constructed one does not, so the
    program terminates and the test fails without exercising the other
    constructor variants.
    
    This patch arranges to disable the test altogether when the
    random_device feature is not available.  A reasonable alternative
    would be to install a std::runtime_error handler around the test01
    body, so that we exercise at least the exception raising, but then
    test03 would have to be relaxed, since without even "default", it
    likely wouldn't meet the tested requirement there.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/26_numerics/random/random_device/cons/token.cc:
            Require effective target feature random_device.

Diff:
---
 libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
index defb8d58c58..105ae0ba877 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-require-effective-target random_device }
 // { dg-require-cstdint "" }
 //
 // 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] require et random_device for cons token test
@ 2021-03-23 12:33 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2021-03-23 12:33 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:daf640878b9ac2d7b9beb70803b4eaa0c104419e

commit daf640878b9ac2d7b9beb70803b4eaa0c104419e
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Tue Mar 23 09:28:10 2021 -0300

    require et random_device for cons token test
    
    On target systems that don't support any random_device, not even the
    default one, other random_device constructor tests are disabled by
    dg-require-effective-target random_device.  The token.cc also
    exercises the default constructor, in a way that doesn't expect an
    exception to be raised, but it's not guarded by the same requirement.
    
    Other potentially-raising ctors in token.cc expect exceptions and
    handle them, but the ("default")-constructed one does not, so the
    program terminates and the test fails without exercising the other
    constructor variants.
    
    This patch arranges to disable the test altogether when the
    random_device feature is not available.  A reasonable alternative
    would be to install a std::runtime_error handler around the test01
    body, so that we exercise at least the exception raising, but then
    test03 would have to be relaxed, since without even "default", it
    likely wouldn't meet the tested requirement there.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/26_numerics/random/random_device/cons/token.cc:
            Require effective target feature random_device.

Diff:
---
 libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
index defb8d58c58..105ae0ba877 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-require-effective-target random_device }
 // { dg-require-cstdint "" }
 //
 // 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-24  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  6:29 [gcc(refs/users/aoliva/heads/testme)] require et random_device for cons token test Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2021-03-24  9:07 Alexandre Oliva
2021-03-23 12:33 Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).