[gdb/testsuite] Fix path in test name in gdb_load_shlib
commit8ed73e316466987d0d33ce9e21ebc8ff9aa4c4d7
authorTom de Vries <tdevries@suse.de>
Fri, 7 Oct 2022 14:17:34 +0000 (7 16:17 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 7 Oct 2022 14:17:34 +0000 (7 16:17 +0200)
treec5fefc476788a2c9d7aea172427a2f07a237b6aa
parentea4e4a19b7f6c192c307b5a37c67d141f3aea074
[gdb/testsuite] Fix path in test name in gdb_load_shlib

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.
gdb/testsuite/lib/gdb.exp