From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 08/10] [gdb/testsuite] Fix gdb.dwarf2/gdb-index-cxx.exp for remote host
Date: Mon, 27 Mar 2023 13:58:56 +0200 [thread overview]
Message-ID: <20230327115858.5950-9-tdevries@suse.de> (raw)
In-Reply-To: <20230327115858.5950-1-tdevries@suse.de>
Fix test-case gdb.dwarf2/gdb-index-cxx.exp for remote host using
host_standard_output_file.
Tested on x86_64-linux.
---
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}" \
}
# 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 == "" } {
+ if { $basename == "" } {
+ return "."
+ }
return $basename
} else {
return [join [list $remotedir $basename] "/"]
--
2.35.3
next prev parent reply other threads:[~2023-03-27 11:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 11:58 [pushed 00/10] [gdb/testsuite] Fix gdb.dwarf2 " Tom de Vries
2023-03-27 11:58 ` [pushed 01/10] [gdb/testsuite] Add missing include_file in gdb.dwarf/*.exp Tom de Vries
2023-03-27 11:58 ` [pushed 02/10] [gdb/testsuite] Fix have_index for remote host Tom de Vries
2023-03-27 11:58 ` [pushed 03/10] [gdb/testsuite] Fix quoting issues in gdb.dwarf2 " Tom de Vries
2023-03-27 11:58 ` [pushed 04/10] [gdb/testsuite] Fix quoting issue in gdb.base/index-cache.exp Tom de Vries
2023-03-27 11:58 ` [pushed 05/10] [gdb/testsuite] Fix gdb.dwarf2/per-bfd-sharing.exp for remote host Tom de Vries
2023-03-27 11:58 ` [pushed 06/10] [gdb/testsuite] Fix gdb.dwarf2/gdb-index.exp on " Tom de Vries
2023-03-27 11:58 ` [pushed 07/10] [gdb/testsuite] Fix gdb.dwarf2/enqueued-cu-base-addr.exp for " Tom de Vries
2023-03-27 11:58 ` Tom de Vries [this message]
2023-03-27 11:58 ` [pushed 09/10] [gdb/testsuite] Unsupport gdb.dwarf2/gdb-add-index-symlink.exp " Tom de Vries
2023-03-27 11:58 ` [pushed 10/10] [gdb/testsuite] Fix gdb.dwarf2/imported-unit-bp-c.exp " Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230327115858.5950-9-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).