public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Fix path in test name in gdb_load_shlib
@ 2022-10-07 14:18 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-10-07 14:18 UTC (permalink / raw)
  To: gdb-patches

Hi,

When running test-case gdb.server/solib-list.exp with target board
remote-gdbserver-on-localhost, I run into:
...
(gdb) set solib-search-path $outputs/gdb.server/solib-list^M
(gdb) PASS: gdb.server/solib-list.exp: non-stop 0: \
  set solib-search-path $outputs/gdb.server/solib-list
PATH: gdb.server/solib-list.exp: non-stop 0: \
  set solib-search-path $outputs/gdb.server/solib-list
...

This is due to this code in gdb_load_shlib:
...
       gdb_test "set solib-search-path [file dirname $file]" "" ""
...

Fix this by setting an explicit test name.

Tested on x86_64-linux, with native and target boards
remote-gdbserver-on-localhost, native-gdbserver and native-extended-gdbserver.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix path in test name in gdb_load_shlib

---
 gdb/testsuite/lib/gdb.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 432ed5e34ca..d60dceffd3f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5614,7 +5614,8 @@ proc gdb_load_shlib { file } {
 	# We could set this even when not testing remotely, but a user
 	# generally won't set it unless necessary.  In order to make the tests
 	# more like the real-life scenarios, we don't set it for local testing.
-	gdb_test "set solib-search-path [file dirname $file]" "" ""
+	gdb_test "set solib-search-path [file dirname $file]" "" \
+	    "set solib-search-path for [file tail $file]"
     }
 
     return $dest

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-07 14:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 14:18 [committed][gdb/testsuite] Fix path in test name in gdb_load_shlib Tom de Vries

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).