From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 08BD53858C74; Mon, 27 Mar 2023 11:58:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08BD53858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679918332; bh=+Zr4n3doHGdohAlUDP/rh/4ufCjwURJowxYN58pWbpQ=; h=From:To:Subject:Date:From; b=FkXEYWm2m9z0WhT/eD6cYVHbKCcZlbphUIEM0GYH7SK1fg+nHwV4EP0ALQoj8VIM+ osJaj7v/cyu5Q7V5kl5UuaT+Oj8xb7P1mBYAhK1Q7boD7aIXBAQcilFhfWTx0dTo2Y U7/U/Fezbk7/mBC6tcrVC6t1en/kxXhGvgvItOkc= 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 gdb.dwarf2/gdb-index-cxx.exp for remote host X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 468f212c5779d1c6ad68a5add2c41a862255ca25 X-Git-Newrev: 623f8c6b88161ea272137a5d6f5df8aada2e1656 Message-Id: <20230327115852.08BD53858C74@sourceware.org> Date: Mon, 27 Mar 2023 11:58:52 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D623f8c6b8816= 1ea272137a5d6f5df8aada2e1656 commit 623f8c6b88161ea272137a5d6f5df8aada2e1656 Author: Tom de Vries Date: Mon Mar 27 13:58:10 2023 +0200 [gdb/testsuite] Fix gdb.dwarf2/gdb-index-cxx.exp for remote host =20 Fix test-case gdb.dwarf2/gdb-index-cxx.exp for remote host using host_standard_output_file. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp | 2 +- gdb/testsuite/lib/gdb.exp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp b/gdb/testsuite/gdb= .dwarf2/gdb-index-cxx.exp index 3c3d6cc463d..6fffc982722 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" "${testfile}= " \ } =20 # The bug was that gdb would crash when saving. -set output_dir [standard_output_file ""] +set output_dir [host_standard_output_file ""] set cmd "save gdb-index" gdb_test_multiple "$cmd $output_dir" $cmd { -re -wrap "Cannot use an index to create the index.*" { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 39ed5ad761b..14ce39e8ed7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6414,6 +6414,9 @@ proc host_standard_output_file { basename } { if { [is_remote host] } { set remotedir [board_info host remotedir] if { $remotedir =3D=3D "" } { + if { $basename =3D=3D "" } { + return "." + } return $basename } else { return [join [list $remotedir $basename] "/"]