From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA/testsuite] Reset the timeout duration at the start of each testcase.
Date: Mon, 08 Feb 2010 11:36:00 -0000 [thread overview]
Message-ID: <20100208113625.GB16325@adacore.com> (raw)
In-Reply-To: <20100205173318.GB16328@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
> How about gdb_test_timeout, then?
Sure. Attached is what I have checked in.
--
Joel
[-- Attachment #2: gdb_test_timeout.diff --]
[-- Type: text/x-diff, Size: 1223 bytes --]
gdb/testsuite/ChangeLog:
* lib/gdb.exp (gdb_test_timeout): New global variable.
Set it to timeout if not already set.
(gdb_init): Reset the value of timeout to gdb_test_timeout.
---
gdb/testsuite/lib/gdb.exp | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9b06a2f..621fc3b 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2410,7 +2410,22 @@ proc default_gdb_init { args } {
}
}
+# The default timeout used when testing GDB commands. We want to use
+# the same timeout as the default dejagnu timeout, unless the user has
+# already provided a specific value (probably through a site.exp file).
+global gdb_test_timeout
+if ![info exists gdb_test_timeout] {
+ set gdb_test_timeout $timeout
+}
+
proc gdb_init { args } {
+ # Reset the timeout value to the default. This way, any testcase
+ # that changes the timeout value without resetting it cannot affect
+ # the timeout used in subsequent testcases.
+ global gdb_test_timeout
+ global timeout
+ set timeout $gdb_test_timeout
+
return [eval default_gdb_init $args];
}
--
1.6.3.3
next prev parent reply other threads:[~2010-02-08 11:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-28 21:53 RFC: Fix testsuite timeout clobbers Daniel Jacobowitz
2010-01-29 4:00 ` Joel Brobecker
2010-01-29 15:37 ` Daniel Jacobowitz
2010-02-04 6:08 ` [RFA/testsuite] Reset the timeout duration at the start of each testcase Joel Brobecker
2010-02-04 15:54 ` Tom Tromey
2010-02-04 16:00 ` Daniel Jacobowitz
2010-02-04 17:43 ` Joel Brobecker
2010-02-04 18:16 ` Daniel Jacobowitz
2010-02-05 7:22 ` Joel Brobecker
2010-02-05 17:33 ` Daniel Jacobowitz
2010-02-08 11:36 ` Joel Brobecker [this message]
2010-02-04 6:13 ` RFC: Fix testsuite timeout clobbers Joel Brobecker
2010-01-29 16:49 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100208113625.GB16325@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox