From: Lancelot SIX Date: Wed, 19 Jan 2022 10:44:06 +0000 (-0500) Subject: gdb/testsuite: Ensure constant test name in gdb.base/break-interp.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8357282156771d782be3e3c3d44cc5ad7e1f89d7;p=binutils-gdb.git gdb/testsuite: Ensure constant test name in gdb.base/break-interp.exp 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 --- 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