public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Increase timeout for tests in debug mode
@ 2020-12-15 15:42 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-12-15 15:42 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

These tests FAIL when testing debug mode with a small tool_timeout
value. Give them a longer relative timeout.

libstdc++-v3/ChangeLog:

	* testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
	Add dg-timeout-factor directive.
	* testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc:
	Increase timeout factor from 2.0 to 3.0.
	* testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc:
	Likewise.
	* testsuite/lib/libstdc++.exp (check_effective_target_debug-mode):
	Define "debug-mode" as an effective-target keyword.

Tested powerpc64le-linux (normal and debug mode). Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 3190 bytes --]

commit e831ad4dab9d693885a5654d49e8f219e53eaee1
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Dec 15 15:39:58 2020

    libstdc++: Increase timeout for tests in debug mode
    
    These tests FAIL when testing debug mode with a small tool_timeout
    value. Give them a longer relative timeout.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
            Add dg-timeout-factor directive.
            * testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc:
            Increase timeout factor from 2.0 to 3.0.
            * testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc:
            Likewise.
            * testsuite/lib/libstdc++.exp (check_effective_target_debug-mode):
            Define "debug-mode" as an effective-target keyword.

diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc
index 14a75358db4..65aafdcf03d 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc
@@ -15,6 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+// { dg-timeout-factor 2 { target debug-mode } }
+
 #include <algorithm>
 #include <vector>
 #include <deque>
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc
index 627f3864347..411a906d598 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc
@@ -2,7 +2,7 @@
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
+// { dg-timeout-factor 3.0 }
 
 // -*- C++ -*-
 
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc
index cd7b1118e26..dd1b45c3491 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc
@@ -2,7 +2,7 @@
 // { dg-require-time "" }
 // This can take long on simulators, timing out the test.
 // { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
+// { dg-timeout-factor 3.0 }
 
 // -*- C++ -*-
 
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 35817a8870a..aeb881f91a6 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1004,6 +1004,11 @@ proc check_v3_target_debug_mode { } {
     }]
 }
 
+# Define "debug-mode" as an effective-target keyword.
+proc check_effective_target_debug-mode { } {
+    return [check_v3_target_debug_mode]
+}
+
 # Return 1 if normal mode is active, 0 otherwise.
 # i.e. neither Debug Mode nor Parallel Mode is active.
 proc check_v3_target_normal_mode { } {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-15 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 15:42 [committed] libstdc++: Increase timeout for tests in debug mode Jonathan Wakely

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).