From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 4E50F3858C56; Fri, 7 Oct 2022 14:17:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E50F3858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665152260; bh=3P8oCvJ6rYbJlEYAQKuw/0s5DVDYgJu9RQRY9P71c9E=; h=From:To:Subject:Date:From; b=G6K27pkvcR8TFWqc6BrEGnQKC/huBefesKqxWXQajlatO1iEswRbqm7viWuB5N1o/ CiFGfcJsLAAgOWaDBVchQpjC68jEFWo2HM+esAnIlTzJpl9NgCr71U5A3QkJji61yQ vSYT1iC2u97Ie5W+ftMZhGK7R1nIJe69Seaxam8g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix path in test name in gdb_load_shlib X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: ea4e4a19b7f6c192c307b5a37c67d141f3aea074 X-Git-Newrev: 8ed73e316466987d0d33ce9e21ebc8ff9aa4c4d7 Message-Id: <20221007141740.4E50F3858C56@sourceware.org> Date: Fri, 7 Oct 2022 14:17:40 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8ed73e316466= 987d0d33ce9e21ebc8ff9aa4c4d7 commit 8ed73e316466987d0d33ce9e21ebc8ff9aa4c4d7 Author: Tom de Vries Date: Fri Oct 7 16:17:34 2022 +0200 [gdb/testsuite] Fix path in test name in gdb_load_shlib =20 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 ... =20 This is due to this code in gdb_load_shlib: ... gdb_test "set solib-search-path [file dirname $file]" "" "" ... =20 Fix this by setting an explicit test name. =20 Tested on x86_64-linux, with native and target boards remote-gdbserver-on-localhost, native-gdbserver and native-extended-gdb= server. Diff: --- 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]" } =20 return $dest