From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PUSHED] gdb/testsuite: avoid stack addresses in test names
Date: Mon, 10 Jul 2023 12:22:32 +0100 [thread overview]
Message-ID: <9f462ddef8456dc3b47e21f5f1995d1119e18b3f.1688988130.git.aburgess@redhat.com> (raw)
When comparing the test results for two different runs of GDB I
noticed a difference in the results for gdb.base/frame-view.exp.
The difference was caused by one of the tests including a stack
address in the test name:
PASS: gdb.base/frame-view.exp: with_pretty_printer=false: select-frame view 0x7ffff7c5cea8 0x40115b
and
PASS: gdb.base/frame-view.exp: with_pretty_printer=true: select-frame view 0x7ffff7c5cea8 0x40115b
If for whatever reason the stack address changes between test runs
then it becomes harder to compare results.
Fix this by giving the test a descriptive name that doesn't include a
stack address:
PASS: gdb.base/frame-view.exp: with_pretty_printer=false: select thread 2 frame from thread 1
and
PASS: gdb.base/frame-view.exp: with_pretty_printer=true: select thread 2 frame from thread 1
There's no change to what is actually tested after this commit.
---
gdb/testsuite/gdb.base/frame-view.exp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/frame-view.exp b/gdb/testsuite/gdb.base/frame-view.exp
index d71b369fd79..b139ecf94b2 100644
--- a/gdb/testsuite/gdb.base/frame-view.exp
+++ b/gdb/testsuite/gdb.base/frame-view.exp
@@ -73,7 +73,8 @@ proc test_select_frame_view { with_pretty_printer } {
# Select thread 2's frame in thread 1.
gdb_test "thread 1" "Switching to thread 1 .*"
- gdb_test_no_output "select-frame view $frame_sp $frame_pc"
+ gdb_test_no_output "select-frame view $frame_sp $frame_pc" \
+ "select thread 2 frame from thread 1"
if { $with_pretty_printer } {
# When the pretty printer does its infcall, it is done on the currently
base-commit: 44c8334f4af5b9895d196077f23e20e15eff4c03
--
2.25.4
reply other threads:[~2023-07-10 11:22 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=9f462ddef8456dc3b47e21f5f1995d1119e18b3f.1688988130.git.aburgess@redhat.com \
--to=aburgess@redhat.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).