From: Andrew Burgess Date: Mon, 10 Jul 2023 11:16:30 +0000 (+0100) Subject: gdb/testsuite: avoid stack addresses in test names X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f462ddef8456dc3b47e21f5f1995d1119e18b3f;p=binutils-gdb.git gdb/testsuite: avoid stack addresses in test names 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. --- 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