From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19851 invoked by alias); 8 Nov 2011 07:56:46 -0000 Received: (qmail 19840 invoked by uid 22791); 8 Nov 2011 07:56:45 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Nov 2011 07:56:26 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA87uDOC018740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Nov 2011 02:56:14 -0500 Received: from host1.jankratochvil.net (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA87uB9g025987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Nov 2011 02:56:13 -0500 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id pA87uAKg023814; Tue, 8 Nov 2011 08:56:10 +0100 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id pA87u9E3023813; Tue, 8 Nov 2011 08:56:09 +0100 Date: Tue, 08 Nov 2011 07:56:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Doug Evans , gdb-patches@sourceware.org Subject: Re: [patch] print-threads.exp: Extend timeout for slower tests. Message-ID: <20111108075608.GA22184@host1.jankratochvil.net> References: <20111102221154.8A3C12461B1@ruffy.mtv.corp.google.com> <20111102232147.GA7605@host1.jankratochvil.net> <20111107162202.GG14508@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111107162202.GG14508@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2011-11/txt/msg00178.txt.bz2 On Mon, 07 Nov 2011 17:22:02 +0100, Joel Brobecker wrote: > > >> +# Record the old timeout, we need to extend it for slower tests. > > >> +set oldtimeout $timeout > > > > > > You can use global $gdb_test_timeout nowadays. > > > > Thanks, I didn't know about gdb_test_timeout. > > Still, I like the patch as is, one less global the code has to care about. > > Same here. I did not agree with Doug. I think there was just some misunderstanding. I was proposing the attached patch. The very last line is sure redundant but I think it should be there for the possibility of future test additions. Found in Doug's original patch: set $timeout $oldtimeout should have been: set timeout $oldtimeout Thanks, Jan gdb/testsuite/ 2011-11-08 Doug Evans Jan Kratochvil * gdb.threads/print-threads.exp: Extend timeout for slower tests. --- a/gdb/testsuite/gdb.threads/print-threads.exp +++ b/gdb/testsuite/gdb.threads/print-threads.exp @@ -106,12 +106,18 @@ test_all_threads "fast" 0 runto_main gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\." "break thread_function (2)" gdb_test_no_output "set var slow = 1" +# Extend the timeout for slower tests. +set timeout [expr $gdb_test_timeout + 120] test_all_threads "slow" 0 +set timeout $gdb_test_timeout runto_main gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\." "break thread_function (3)" gdb_test_no_output "set var slow = 1" "set var slow = 1 (2)" gdb_breakpoint "kill" +# Extend the timeout for slower tests. +set timeout [expr $gdb_test_timeout + 120] test_all_threads "slow with kill breakpoint" 1 +set timeout $gdb_test_timeout return 0