From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22378 invoked by alias); 24 May 2013 02:27:20 -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 22366 invoked by uid 89); 24 May 2013 02:27:19 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 24 May 2013 02:27:18 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Ufhit-00035d-Uh from Yao_Qi@mentor.com ; Thu, 23 May 2013 19:27:15 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 23 May 2013 19:27:15 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Thu, 23 May 2013 19:27:15 -0700 Message-ID: <519ED019.4020401@codesourcery.com> Date: Fri, 24 May 2013 02:27:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 5/5] range stepping: tests References: <20130514191026.13213.39574.stgit@brno.lan> <20130514191102.13213.74060.stgit@brno.lan> <519CD71E.1060402@codesourcery.com> <519E59EB.10704@redhat.com> In-Reply-To: <519E59EB.10704@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00900.txt.bz2 On 05/24/2013 02:03 AM, Pedro Alves wrote: > But I'm not understanding how this is catching the issue. Why > would "print/x \$pc" fail if the stub degenerates to > implementing vCont;r as a single instruction step? I switch to letting proc exec_cmd_expect_vCont_count return 0 or 1 to indicate the test pass or not, and skip the rest if it returns 1 in the test. How about this below? -- Yao (齐尧) gdb/testsuite: 2013-05-24 Yao Qi Pedro Alves * gdb.base/range-stepping.exp: Skip the rest of tests if the test fails. * lib/range-stepping-support.exp (exec_cmd_expect_vCont_count): Return 0 if the test passes, otherwise return 1. --- gdb/testsuite/gdb.base/range-stepping.exp | 10 +++++++++- gdb/testsuite/lib/range-stepping-support.exp | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp index 48fc15b..d17596c 100644 --- a/gdb/testsuite/gdb.base/range-stepping.exp +++ b/gdb/testsuite/gdb.base/range-stepping.exp @@ -76,7 +76,15 @@ with_test_prefix "multi insns" { # <-- T05 # --> vCont;rSTART,END (range step) # <-- T05 - exec_cmd_expect_vCont_count "next" 1 1 + set result [exec_cmd_expect_vCont_count "next" 1 1] + if { $result } { + # This is the first range-stepping test, and the simplest + # one. If it fails, probably the rest of the tests would + # fail too, and the huge number of rsp packets in the test + # with the time-consuming loop would blow up the gdb.log file. + # Skip the rest of the tests. + return + } set pc_after_stepping "" set msg "pc after stepping" diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp index d849665..ab38b11 100644 --- a/gdb/testsuite/lib/range-stepping-support.exp +++ b/gdb/testsuite/lib/range-stepping-support.exp @@ -14,7 +14,8 @@ # along with this program. If not, see . # Execute command CMD and check that GDB sends the expected number of -# vCont;s and vCont;r packets. +# vCont;s and vCont;r packets. Returns 0 if the test passes, +# otherwise returns 1. proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { global gdb_prompt @@ -24,6 +25,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { set test "${cmd}: vCont;s=${exp_vCont_s} vCont;r=${exp_vCont_r}" set r_counter 0 set s_counter 0 + set ret 1 gdb_test_multiple $cmd $test { -re "vCont;s\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" { incr s_counter @@ -40,6 +42,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { -re "$gdb_prompt $" { if { $r_counter == ${exp_vCont_r} && $s_counter == ${exp_vCont_s} } { pass $test + set ret 0 } else { fail $test } @@ -47,4 +50,5 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { } gdb_test_no_output "set debug remote 0" "" + return $ret } -- 1.7.7.6