Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
To: gdb-patches@sourceware.org
Cc: uweigand@de.ibm.com
Subject: [PATCH] [PowerPC] Fix "info vector" test in gdb.arch/altivec-regs.exp
Date: Thu, 10 Jan 2019 19:45:00 -0000	[thread overview]
Message-ID: <20190110194434.842-2-pedromfc@linux.ibm.com> (raw)
In-Reply-To: <20190110194434.842-1-pedromfc@linux.ibm.com>

This patch fixes one of the tests in gdb.arch/altivec-regs.exp that
was passing an incorrect list to gdb_expect_list, which always
matched.

gdb/testsuite/ChangeLog:
2018-01-10  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>

	* gdb.arch/altivec-regs.exp: Fix the list passed to
	gdb_expect_list when testign "info vector".
---
 gdb/testsuite/gdb.arch/altivec-regs.exp | 43 ++++-----------------------------
 1 file changed, 5 insertions(+), 38 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 5647fb5e86..d23039244f 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -117,47 +117,14 @@ gdb_test "print \$vrsave" ".* = 1" "print vrsave"
 gdb_test "print \$vscr" ".* = 1" "print vscr"
 
 for {set i 0} {$i < 32} {incr i 1} {
-         set pattern$i ".*vr$i.*"
-         append pattern$i $vector_register
+    lappend pattern_list "vr$i\[ \t\]+$vector_register"
 }
 
+lappend pattern_list "vscr\[ \t\]+0x1"
+lappend pattern_list "vrsave\[ \t\]+0x1"
+
 send_gdb "info vector\n"
-gdb_expect_list "info vector" ".*$gdb_prompt $" {
-[$pattern0]
-[$pattern1]
-[$pattern2]
-[$pattern3]
-[$pattern4]
-[$pattern5]
-[$pattern6]
-[$pattern7]
-[$pattern8]
-[$pattern9]
-[$pattern10]
-[$pattern11]
-[$pattern12]
-[$pattern13]
-[$pattern14]
-[$pattern15]
-[$pattern16]
-[$pattern17]
-[$pattern18]
-[$pattern19]
-[$pattern20]
-[$pattern21]
-[$pattern22]
-[$pattern23]
-[$pattern24]
-[$pattern25]
-[$pattern26]
-[$pattern27]
-[$pattern28]
-[$pattern29]
-[$pattern30]
-[$pattern31]
-"\[ \t\n\r\]+vscr\[ \t\]+0x1"
-"\[ \t\n\r\]+vrsave\[ \t\]+0x1"
-}
+gdb_expect_list "info vector" ".*$gdb_prompt $" $pattern_list
 
 gdb_test "break vector_fun" \
  "Breakpoint 2 at.*altivec-regs.c, line \[0-9\]+\\." \
-- 
2.13.6


  reply	other threads:[~2019-01-10 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 19:49 [PATCH] [PowerPC] Aliases for vector registers Pedro Franco de Carvalho
2019-01-10 19:45 ` Pedro Franco de Carvalho [this message]
2019-01-14 14:02   ` [PATCH] [PowerPC] Fix "info vector" test in gdb.arch/altivec-regs.exp Ulrich Weigand
2019-01-14 14:17   ` Andreas Schwab
2019-01-14 19:36     ` Pedro Franco de Carvalho
2019-01-11  6:59 ` [PATCH] [PowerPC] Aliases for vector registers Eli Zaretskii
2019-01-11 18:01   ` Pedro Franco de Carvalho
2019-01-14 14:03 ` Ulrich Weigand
2019-01-14 19:36   ` Pedro Franco de Carvalho

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=20190110194434.842-2-pedromfc@linux.ibm.com \
    --to=pedromfc@linux.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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