Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands.
Date: Thu, 26 Jun 2014 13:52:00 -0000	[thread overview]
Message-ID: <87pphvhj6i.fsf@br87z6lw.de.ibm.com> (raw)

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
-- 
1.8.4.2


             reply	other threads:[~2014-06-26 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 13:52 Andreas Arnez [this message]
2014-06-26 14:15 ` Pedro Alves
2014-06-26 15:21   ` Andreas Arnez
2014-06-30 11:36     ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pphvhj6i.fsf@br87z6lw.de.ibm.com \
    --to=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox