From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27642 invoked by alias); 29 Jul 2014 12:53:05 -0000 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 Received: (qmail 18258 invoked by uid 89); 29 Jul 2014 12:44:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 29 Jul 2014 12:44:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6TCiedL020097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jul 2014 08:44:41 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6TCicHQ013985; Tue, 29 Jul 2014 08:44:39 -0400 Message-ID: <53D79736.5000100@redhat.com> Date: Tue, 29 Jul 2014 12:59:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Maciej W. Rozycki" , gdb-patches@sourceware.org Subject: Re: [PATCH] GDB/testsuite: Correct gdb.base/watchpoint-solib.exp timeout tweak References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00724.txt.bz2 On 07/29/2014 01:10 PM, Maciej W. Rozycki wrote: > Hi, > > Similarly to the changes to gdb.reverse/sigall-reverse.exp and > gdb.reverse/until-precsave.exp recently posted this corrects the timeout > tweak in gdb.base/watchpoint-solib.exp. > > This test case executes a large amount of code with a software watchpoint > enabled. This means single-stepping all the way through and takes a lot > of time, e.g. for an ARMv7 Panda board and a `-march=armv5te' multilib: > > PASS: gdb.base/watchpoint-solib.exp: continue to foo again > elapsed: 714 > > for the same board and a `-mthumb -march=armv5te' multilib: > > PASS: gdb.base/watchpoint-solib.exp: continue to foo again > elapsed: 1275 > > and for QEMU in the system emulation mode and a `-march=armv4t' > multilib: > > PASS: gdb.base/watchpoint-solib.exp: continue to foo again > elapsed: 115 > > (values in seconds) -- all of which having the default timeout of 60s, set > based on the requirement of the remaining test cases (other than > gdb.reverse ones). > > Here again the timeout extension to have a meaning should be calculated > by scaling rather than using an arbitrary constant, and a larger factor of > 30 will do, leaving some margin. Hopefully for everyone or otherwise > we'll probably have to come up with a smarter solution. > > OTOH the other test cases in this script do not require the extension so > they can be moved outside its umbrella so as to avoid unnecessary delays > if something goes wrong and a genuine timeout triggers. > > Tested on arm-linux-gnueabi. OK to apply? OK > + > +set savedtimeout $timeout > +if { [target_info exists gdb,timeout] > + && $timeout < [target_info gdb,timeout] } { > + set oldtimeout [target_info gdb,timeout] > +} else { > + set oldtimeout $timeout > +} > +set timeout [expr $oldtimeout * 30] Clearly this pattern is going to be popping in more places going forward. Maybe we should even consider factoring it out to a with_test_prefix-like procedure. Something like: proc with_timeout_factor { factor } { ... } with_timeout_factor 30 { ... gdb_test "continue" ".*Breakpoint 2.*foo.*" "continue to foo again" ... } Thanks, Pedro Alves