public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Luis Machado <luisgpm@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Harden gdb.arch/aarch64-pauth.exp and fix a failure
Date: Fri, 28 Feb 2020 10:28:00 -0000	[thread overview]
Message-ID: <20200228102805.6465.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=85d2d5bbee1c21c2e3e929cc68fe06d762b3073b

commit 85d2d5bbee1c21c2e3e929cc68fe06d762b3073b
Author: Luis Machado <luis.machado@linaro.org>
Date:   Fri Feb 21 17:58:48 2020 -0300

    Harden gdb.arch/aarch64-pauth.exp and fix a failure
    
    When running this testcase against a QEMU with PAC support, i noticed we
    were failing to recognize the additional [PAC] that is emitted in the
    backtrace, resulting in this failure:
    
    FAIL: gdb.arch/aarch64-pauth.exp: backtrace
    
    I've made the test use multi_line to make the pattern more clear.
    
    Tested against aarch64-linux-gnu with and without PAC support.
    
    gdb/testsuite/ChangeLog:
    
    2020-02-28  Luis Machado  <luis.machado@linaro.org>
    
    	* gdb.arch/aarch64-pauth.exp: Recognize optional PAC output.

Diff:
---
 gdb/testsuite/ChangeLog                  | 4 ++++
 gdb/testsuite/gdb.arch/aarch64-pauth.exp | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d5798bd..eb81976 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2020-02-28  Luis Machado  <luis.machado@linaro.org>
+
+	* gdb.arch/aarch64-pauth.exp: Recognize optional PAC output.
+
 2020-02-27  Tom de Vries  <tdevries@suse.de>
 
 	* config/sid.exp: Remove unused globals.
diff --git a/gdb/testsuite/gdb.arch/aarch64-pauth.exp b/gdb/testsuite/gdb.arch/aarch64-pauth.exp
index 816e58b..264bfce 100644
--- a/gdb/testsuite/gdb.arch/aarch64-pauth.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-pauth.exp
@@ -40,4 +40,9 @@ gdb_breakpoint [ gdb_get_line_number "break here" ]
 gdb_continue_to_breakpoint "break here" ".*break here.*"
 
 # Ensure we can get a full backtrace, despite the address signing.
-gdb_test "bt" "^bt\r\n#0 +bar *\\(b=9\\) +at.*\r\n#1 +0x\[0-9a-f\]* +in +foo \\(a=5\\).*\r\n#2 +0x\[0-9a-f\]* +in +main \\(\\).*" "backtrace"
+gdb_test "bt" \
+    [multi_line \
+	"#0\[ \t\]+bar \\(b=9\\) at \[^\r\n\]+" \
+	"#1\[ \t\]+$hex (\\\[PAC\\\] )?in foo \\(a=5\\) at \[^\r\n\]+" \
+	"#2\[ \t\]+$hex (\\\[PAC\\\] )?in main \\(\\) at \[^\r\n\]+" ] \
+    "backtrace"


                 reply	other threads:[~2020-02-28 10:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200228102805.6465.qmail@sourceware.org \
    --to=luisgpm@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).