From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19267 invoked by alias); 29 Jul 2014 12:10:52 -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 19233 invoked by uid 89); 29 Jul 2014 12:10:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Jul 2014 12:10:46 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1XC6Et-0000IQ-Di from Maciej_Rozycki@mentor.com for gdb-patches@sourceware.org; Tue, 29 Jul 2014 05:10:43 -0700 Received: from SVR-IES-FEM-02.mgc.mentorg.com ([137.202.0.106]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 29 Jul 2014 05:10:43 -0700 Received: from localhost (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server (TLS) id 14.2.247.3; Tue, 29 Jul 2014 13:10:41 +0100 Date: Tue, 29 Jul 2014 12:18:00 -0000 From: "Maciej W. Rozycki" To: Subject: [PATCH] GDB/testsuite: Correct gdb.base/watchpoint-solib.exp timeout tweak Message-ID: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-07/txt/msg00717.txt.bz2 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? 2014-07-29 Maciej W. Rozycki gdb/testsuite/ * gdb.base/watchpoint-solib.exp: Increase the timeout by a factor of 30 rather than hardcoding 120 for a slow test case. Take the `gdb,timeout' target setting into account for this calculation. Don't extend the timeout for the test cases that don't need it. Maciej gdb-test-watchpoint-solib-timeout.diff Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.base/watchpoint-solib.exp =================================================================== --- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.base/watchpoint-solib.exp 2014-07-12 14:22:22.848926536 +0100 +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.base/watchpoint-solib.exp 2014-07-28 20:36:12.078936693 +0100 @@ -70,14 +70,22 @@ gdb_test_multiple "break foo" "set pendi } } -set prev_timeout $timeout -set timeout 120 - gdb_test "continue" ".*Breakpoint 2.*foo.*" "continue to foo" gdb_test "watch g" "atchpoint 3: g" "set watchpoint on g" gdb_test "continue" ".*New value = 1.*" "continue to watchpoint hit" rerun_to_main + +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] + gdb_test "continue" ".*Breakpoint 2.*foo.*" "continue to foo again" -gdb_test "continue" ".*New value = 1.*" "continue to watchpoint hit again" -set timeout $prev_timeout +set timeout $savedtimeout + +gdb_test "continue" ".*New value = 1.*" "continue to watchpoint hit again"