public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix stray file in gdb.dwarf2/gdb-index-nodebug.exp
@ 2024-05-01 9:11 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2024-05-01 9:11 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=385ab37c5b79a930f12ee05adc7d9af9f92fe578
commit 385ab37c5b79a930f12ee05adc7d9af9f92fe578
Author: Tom de Vries <tdevries@suse.de>
Date: Wed May 1 11:11:24 2024 +0200
[gdb/testsuite] Fix stray file in gdb.dwarf2/gdb-index-nodebug.exp
After running test-case gdb.dwarf2/gdb-index-nodebug.exp I have:
...
$ ls build/gdb/testsuite
cache config.status gdb.log lib outputs site.exp
config.log gdb-index-nodebug.gdb-index gdb.sum Makefile site.bak temp
...
The file gdb-index-nodebug.gdb-index doesn't belong there.
It happens to be there because we do:
...
set index_file ${testfile}.gdb-index
set cmd "save gdb-index [file dirname ${index_file}]"
...
which results in:
...
(gdb) save gdb-index .
...
The intention was possibly to use $binfile instead of $testfile, but using
that wouldn't work for remote host.
Fix this by using host_standard_output_file.
Tested on x86_64-linux.
Diff:
---
gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
index 82adb7913fc..cbe456f9c0f 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
@@ -35,9 +35,9 @@ set no_debug_re \
set no_debug_re [join $no_debug_re]
set readnow_p [readnow]
-set index_file ${testfile}.gdb-index
+set index_dir [host_standard_output_file ""]
# The bug was that gdb would crash here.
-set cmd "save gdb-index [file dirname ${index_file}]"
+set cmd "save gdb-index $index_dir"
gdb_test_multiple $cmd "try to save gdb index" {
-re -wrap $have_index_re {
if { $have_index != "" || $readnow_p } {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-01 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 9:11 [binutils-gdb] [gdb/testsuite] Fix stray file in gdb.dwarf2/gdb-index-nodebug.exp 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).