From patchwork Thu Jun 26 15:21:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 1765 Received: (qmail 23806 invoked by alias); 26 Jun 2014 15:21:19 -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 23794 invoked by uid 89); 26 Jun 2014 15:21:18 -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: e06smtp12.uk.ibm.com Received: from e06smtp12.uk.ibm.com (HELO e06smtp12.uk.ibm.com) (195.75.94.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 26 Jun 2014 15:21:15 +0000 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jun 2014 16:21:12 +0100 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 26 Jun 2014 16:21:10 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 84FEB219004D for ; Thu, 26 Jun 2014 16:20:57 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5QFL9rL22937662 for ; Thu, 26 Jun 2014 15:21:09 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5QFL9CD011579 for ; Thu, 26 Jun 2014 09:21:09 -0600 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5QFL8P8011550; Thu, 26 Jun 2014 09:21:08 -0600 From: Andreas Arnez To: Pedro Alves , Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands. References: <87pphvhj6i.fsf@br87z6lw.de.ibm.com> <53AC2AE6.7060401@redhat.com> Date: Thu, 26 Jun 2014 17:21:08 +0200 In-Reply-To: <53AC2AE6.7060401@redhat.com> (Pedro Alves's message of "Thu, 26 Jun 2014 15:15:02 +0100") Message-ID: <87lhsjhf2z.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: 14062615-8372-0000-0000-000000563C5D X-IsSubscribed: yes On Thu, Jun 26 2014, Pedro Alves wrote: >> gdb/testsuite/ >> * gdb.base/watchpoint-reuse-slot.exp: Handle the case that the >> target lacks support for watch, awatch, rwatch, or hbreak. > > s/watch, // , I think, as "watch" falls back to software > watchpoints. OK. > Patch is OK. Good, thanks for reviewing. Uli, would you push this? Thanks :-) -- >8 -- Subject: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands. 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 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