From patchwork Tue Apr 22 18:20:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 642 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id F40F43609AB for ; Tue, 22 Apr 2014 11:45:02 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14314964) id A7A6962DEF593; Tue, 22 Apr 2014 11:45:02 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 8AE0462DEF55E for ; Tue, 22 Apr 2014 11:45:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=A1AV5WVKEuhosJp9tzrXnhQX+No6H7m9OlLovKEuNpcDIWa2ABee6 shc3r0kJImmXgO5jZjG++9IY/wdClBEYcBT1DEmWFA+i+6rFrbsdA+JB3DBo3A4c 6PnDby9QN3TjCl3KU9xlTJ2PcSRiXjnz8DB9yGzhk+GCjnV2DMWp64= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=86lcQjua6azz2BJmVP2ZOyc9ooo=; b=WdNgIC5OFrvgMRZs11m72Rx3ptuX unVAzplcuvIZD6AJJkzhRCFKX4aNEqWmzz0EJzmcw+6RzVOdMpJ8zXUGkHBzg1jr ETU46xVsf40nnrF4/57f97seUm3QZwscGfsIyZwK3gkY/Dm71h2imZjRwkdwWxxK NYjCdbUMVIhyvuM= Received: (qmail 32193 invoked by alias); 22 Apr 2014 18:45:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 32184 invoked by uid 89); 22 Apr 2014 18:45:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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 ESMTP; Tue, 22 Apr 2014 18:45:00 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3MIixUT025070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 22 Apr 2014 14:44:59 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3MIK5Q9026263 for ; Tue, 22 Apr 2014 14:20:06 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [ob/pushed] Make gdb_continue_to_breakpoint fail quickly on internal errors. Date: Tue, 22 Apr 2014 19:20:05 +0100 Message-Id: <1398190805-6859-1-git-send-email-palves@redhat.com> X-DH-Original-To: gdb@patchwork.siddhesh.in This switches the gdb_continue_to_breakpoint routine to use gdb_test_multiple instead of send_gdb/gdb_expect, so that an internal error is detected immediately, instead of failing on timeout. gdb/testsuite/ 2014-04-22 Pedro Alves * lib/gdb.exp (gdb_continue_to_breakpoint): Use gdb_test_multiple instead of send_gdb/gdb_expect. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/gdb.exp | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 865fd0c..1de6dc0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-22 Pedro Alves + + * lib/gdb.exp (gdb_continue_to_breakpoint): Use gdb_test_multiple + instead of send_gdb/gdb_expect. + 2014-04-22 Yao Qi * lib/trace-support.exp (generate_tracefile): New procedure. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 5411cb5..d904b81 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -549,17 +549,10 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} { global gdb_prompt set full_name "continue to breakpoint: $name" - send_gdb "continue\n" - gdb_expect { + gdb_test_multiple "continue" $full_name { -re "(?:Breakpoint|Temporary breakpoint) .* (at|in) $location_pattern\r\n$gdb_prompt $" { pass $full_name } - -re ".*$gdb_prompt $" { - fail $full_name - } - timeout { - fail "$full_name (timeout)" - } } }