public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Lancelot SIX <lancelot.six@amd.com>
To: <gdb-patches@sourceware.org>
Cc: Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH] gdb/testsuite: Ensure constant test name in gdb.base/break-interp.exp
Date: Wed, 19 Jan 2022 05:48:09 -0600	[thread overview]
Message-ID: <20220119114809.117000-1-lancelot.six@amd.com> (raw)

When running the testsuite, I have lines similar to the following in the
gdb.sum file:

~~~
PASS: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: first backtrace: p /x 0x7f283d2f0fd1
...
PASS: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: binprelink=NO: binsepdebug=NO: binpie=NO: INNER: first backtrace: p /x 0x7f00de0317a5
...
~~~

The address part of the command might change between execution of the
test, which adds noise to a diff between two .sum files.

This patch changes to test name to "p /x $pc" in order to have constant
test name.

Tested on x86_64-Linux.

Change-Id: I973c1237a084dd6d424276443cbf0920533c9a21
---
 gdb/testsuite/gdb.base/break-interp.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 87778679274..be1a212ec72 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -437,7 +437,7 @@ proc test_ld {file ifmain trynosym displacement} {
 		} else {
 		    set pc $expect_out(1,string)
 		    regsub "0x0*" $pc "" pc
-		    gdb_test "p /x 0x$pc" ".*"
+		    gdb_test "p /x 0x$pc" ".*" "p /x \$pc"
 		    gdb_test_multiple "info probes stap rtld" $gdb_test_name {
 			-re -wrap "(?:init_start|init_complete) +0x0*$pc .*" {
 			    pass $gdb_test_name
-- 
2.25.1


             reply	other threads:[~2022-01-19 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 11:48 Lancelot SIX [this message]
2022-01-21 19:21 ` Tom Tromey
2022-01-26  9:46   ` Six, Lancelot

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=20220119114809.117000-1-lancelot.six@amd.com \
    --to=lancelot.six@amd.com \
    --cc=gdb-patches@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).