From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id B94D13858D3C; Wed, 19 Oct 2022 11:19:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B94D13858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666178387; bh=n9iNxL1aQqXHPfiV0jJa/w3AHqPiEziW+COnOgVgapA=; h=From:To:Subject:Date:From; b=ae0qncjuHltYw2XSQ/nA1rZkv+reDx+bY2sxtd8etKc1hoWjmU+m+99ujO4x5xTZD VkoUYi9eciO0WvIj+qj8kDvbjYh9h3sd449lxUpoEwBtR+fhg4SfhPhTkUZygPrpNh KJu090VVNw95vuCrcMlqfUkioDmP4Nec5k/hUBdw= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: avoid creating files in gdb/testsuite directory X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 6d6ae7c23dd59fe16f3e366e969b927d97fe5e01 X-Git-Newrev: 536ff91bb8ea90c98737571f85827ce6770324c9 Message-Id: <20221019111947.B94D13858D3C@sourceware.org> Date: Wed, 19 Oct 2022 11:19:47 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D536ff91bb8ea= 90c98737571f85827ce6770324c9 commit 536ff91bb8ea90c98737571f85827ce6770324c9 Author: Andrew Burgess Date: Sun Oct 2 15:18:15 2022 +0100 gdb/testsuite: avoid creating files in gdb/testsuite directory =20 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. =20 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. =20 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/testsui= te/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" " =3D \\{aa =3D 0, bb =3D 0, cc= =3D 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=3Ddebug_str_section $binfile" +set args "--dump-section .debug_str=3D${debug_str_section} $binfile" set result [remote_exec host "[gdb_find_objcopy] $args"] set status [lindex $result 0] set output [lindex $result 1]