From patchwork Thu Jun 26 13:52:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 1763 Received: (qmail 11573 invoked by alias); 26 Jun 2014 13:52:46 -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 11561 invoked by uid 89); 26 Jun 2014 13:52:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp13.uk.ibm.com Received: from e06smtp13.uk.ibm.com (HELO e06smtp13.uk.ibm.com) (195.75.94.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 26 Jun 2014 13:52:44 +0000 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jun 2014 14:52:41 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 26 Jun 2014 14:52:40 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0A5081B08075 for ; Thu, 26 Jun 2014 14:53:12 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5QDqdP136176042 for ; Thu, 26 Jun 2014 13:52:39 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5QDqckd025053 for ; Thu, 26 Jun 2014 07:52:38 -0600 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5QDqbMQ025028; Thu, 26 Jun 2014 07:52:38 -0600 From: Andreas Arnez To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands. Date: Thu, 26 Jun 2014 15:52:37 +0200 Message-ID: <87pphvhj6i.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14062613-2966-0000-0000-000000540AB6 X-IsSubscribed: yes The test case "watchpoint-reuse-slot.exp" yields a lot of failures on s390/s390x: all instances of awatch, rwatch, and hbreak are performed even though they aren't supported on these targets. This is because the test case ignores non-support error messages when probing for support of these commands, like: (gdb) rwatch buf.byte[0] Target does not support this type of hardware watchpoint. The patch adds handling for this case in the appropriate gdb_test_multiple invocations. gdb/testsuite/ * gdb.base/watchpoint-reuse-slot.exp: Handle the case that the target lacks support for watch, awatch, rwatch, or hbreak. --- gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp index aa30398..46bfd56 100644 --- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp +++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp @@ -103,6 +103,9 @@ foreach cmd {"watch" "awatch" "rwatch"} { -re "You may have requested too many.*$gdb_prompt $" { unsupported $test } + -re "Target does not support.*$gdb_prompt $" { + unsupported $test + } -re "$gdb_prompt $" { pass $test lappend cmds $cmd @@ -115,7 +118,10 @@ foreach cmd {"watch" "awatch" "rwatch"} { set test "hbreak" gdb_test_multiple "hbreak main" $test { -re "You may have requested too many.*$gdb_prompt $" { - pass $test + unsupported $test + } + -re "No hardware breakpoint support.*$gdb_prompt $" { + unsupported $test } -re "$gdb_prompt $" { pass $test