public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: avoid creating files in gdb/testsuite directory
@ 2022-10-19 11:19 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2022-10-19 11:19 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=536ff91bb8ea90c98737571f85827ce6770324c9

commit 536ff91bb8ea90c98737571f85827ce6770324c9
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Sun Oct 2 15:18:15 2022 +0100

    gdb/testsuite: avoid creating files in gdb/testsuite directory
    
    I spotted that the test gdb.dwarf2/dw2-using-debug-str.exp was
    creating an output file called debug_str_section in the root
    build/gdb/testsuite directory instead of using the
    build/gdb/testsuite/output/gdb.dwarf2/dw2-using-debug-str/ directory.
    
    This appears to be caused by a missing '$' character.  We setup a
    variable debug_str_section which contains a path within the output
    directory, but then when we build the objcopy command we use
    'debug_str_section' without a '$' prefix, as a result, we create the
    debug_str_section file.
    
    This commit adds the missing '$', the file is now created in the
    output directory.

Diff:
---
 gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
index d27554f2f89..4d1c49044d5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
@@ -105,7 +105,7 @@ gdb_test "p global_var" " = \\{aa = 0, bb = 0, cc = 0\\}"
 # cc-with-dwz-m.exp and cc-with-gnu-debuglink.exp.  Handle this by
 # skipping the remainder of the test-case.
 set debug_str_section "${binfile}-debug-str"
-set args "--dump-section .debug_str=debug_str_section $binfile"
+set args "--dump-section .debug_str=${debug_str_section} $binfile"
 set result [remote_exec host "[gdb_find_objcopy] $args"]
 set status [lindex $result 0]
 set output [lindex $result 1]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-19 11:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 11:19 [binutils-gdb] gdb/testsuite: avoid creating files in gdb/testsuite directory Andrew Burgess

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).