aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-05-09 15:06:12 +0800
committerYao Qi <yao@codesourcery.com>2014-05-20 14:02:02 +0800
commit8b696e31551d5cc7a3a01637c0a8d8246814a962 (patch)
tree8bc92787c8aa802e1eb17990490b2a7540ebddd7
parent73c9764f95f3a06a11948c0a88dacc6e3ebcb660 (diff)
downloadgdb-8b696e31551d5cc7a3a01637c0a8d8246814a962.zip
gdb-8b696e31551d5cc7a3a01637c0a8d8246814a962.tar.gz
gdb-8b696e31551d5cc7a3a01637c0a8d8246814a962.tar.bz2
Set timeout for gdb.reverse/*.exp test cases
Hi, This patch is to add a new board setting gdb_reverse_timeout, which is used to set timeout for all gdb.reverse test cases, which are usually very slow and cause some TIMEOUT failures, for example, on some arm boards. We have some alternatives to this approach, but I am not satisfied with them: - Increase the timeout value. This is the global change, and it may cause some delay where actual failures happen. - Set timeout by gdb_reverse_timeout in every gdb.reverse/*.exp. Then, we have to touch every file under gdb.reverse. In this patch, we choose a central place to set timeout for all tests in gdb.reverse, which is convenient. gdb/testsuite: 2014-05-20 Yao Qi <yao@codesourcery.com> * lib/gdb.exp (gdb_init): Set timeout if test file is under gdb.reverse directory and gdb_reverse_timeout exists in board setting. * README: Document gdb_reverse_timeout.
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/README9
-rw-r--r--gdb/testsuite/lib/gdb.exp5
3 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 78826db..01a6b92 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2014-05-20 Yao Qi <yao@codesourcery.com>
+ * lib/gdb.exp (gdb_init): Set timeout if test file is under
+ gdb.reverse directory and gdb_reverse_timeout exists in board
+ setting.
+ * README: Document gdb_reverse_timeout.
+
+2014-05-20 Yao Qi <yao@codesourcery.com>
+
* lib/gdb.exp (default_gdb_init): Rename argument 'args' by
'test_file_name'. Treat args as a string instead of a list.
(gdb_init): Rename argument 'args' by 'test_file_name'.
diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index e6d5318..eadab57 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -203,6 +203,15 @@ The default value of the timeout is defined in the file
`testsuite/config/unix.exp' (at least for Unix hosts; board files may
have their own values).
+gdb_reverse_timeout
+
+Defining this variable changes the default timeout duration when tests
+under gdb.reverse directory are running. Process record and reverse
+debugging is so slow that its tests have unexpected `TIMEOUT' test
+failures. This global variable is useful to bump up the value of
+`timeout' for gdb.reverse tests and doesn't cause any delay where
+actual failures happen in the rest of the testsuite.
+
Board Settings
**************
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a34ab3a..0fe6c31 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3691,6 +3691,11 @@ proc gdb_init { test_file_name } {
global timeout
set timeout $gdb_test_timeout
+ if { [regexp ".*gdb\.reverse\/.*" $test_file_name]
+ && [target_info exists gdb_reverse_timeout] } {
+ set timeout [target_info gdb_reverse_timeout]
+ }
+
# If GDB_INOTIFY is given, check for writes to '.'. This is a
# debugging tool to help confirm that the test suite is
# parallel-safe. You need "inotifywait" from the