From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7738 invoked by alias); 8 Feb 2010 11:36:48 -0000 Received: (qmail 7730 invoked by uid 22791); 8 Feb 2010 11:36:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Feb 2010 11:36:44 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 782D72BAB70 for ; Mon, 8 Feb 2010 06:36:42 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GuYLzZYySdjY for ; Mon, 8 Feb 2010 06:36:42 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D55292BAB6A for ; Mon, 8 Feb 2010 06:36:41 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 65E06F59A2; Mon, 8 Feb 2010 15:36:25 +0400 (RET) Date: Mon, 08 Feb 2010 11:36:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA/testsuite] Reset the timeout duration at the start of each testcase. Message-ID: <20100208113625.GB16325@adacore.com> References: <20100129153726.GC30542@caradoc.them.org> <1265263706-22569-1-git-send-email-brobecker@adacore.com> <20100204155956.GA14962@caradoc.them.org> <20100204174254.GC2715@adacore.com> <20100204181621.GB27544@caradoc.them.org> <20100205072223.GB4335@adacore.com> <20100205173318.GB16328@caradoc.them.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <20100205173318.GB16328@caradoc.them.org> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00202.txt.bz2 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 89 > How about gdb_test_timeout, then? Sure. Attached is what I have checked in. -- Joel --pf9I7BMVVzbSWLtt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="gdb_test_timeout.diff" Content-length: 1223 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 --pf9I7BMVVzbSWLtt--