From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 5CF473858D32 for ; Mon, 3 Oct 2022 11:13:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CF473858D32 Received: from octopus (cust120-dsl54.idnet.net [212.69.54.120]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id DEFBC80E98; Mon, 3 Oct 2022 11:13:31 +0000 (UTC) Date: Mon, 3 Oct 2022 12:12:54 +0100 From: Lancelot SIX To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb/testsuite: avoid creating files in gdb/testsuite directory Message-ID: <20221003111213.rzfci537xl3xbfkw@octopus> References: <337887b9594348c5880b7adbc0850e72e319e857.1664721741.git.aburgess@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <337887b9594348c5880b7adbc0850e72e319e857.1664721741.git.aburgess@redhat.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Mon, 03 Oct 2022 11:13:32 +0000 (UTC) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2022 11:13:36 -0000 Hi Andrew, On Sun, Oct 02, 2022 at 03:43:56PM +0100, Andrew Burgess via Gdb-patches wrote: > 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 is a result of not using standard_output_file in the test > script. > > With this commit the file is now placed in the expected output > directory. The test still passes for me. > --- > gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp | 3 ++- > 1 file changed, 2 insertions(+), 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..729961c99b5 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp > @@ -105,7 +105,8 @@ 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 debug_str_file [standard_output_file "debug_str_section"] > +set args "--dump-section .debug_str=${debug_str_file} $binfile" Just above your change, there is the following line: set debug_str_section "${binfile}-debug-str" I believe that the original intent was to use this as output file name, but the '$' was use in the set args line. It looks to me that the change should be: -set args "--dump-section .debug_str=debug_str_section $binfile" +set args "--dump-section .debug_str=$debug_str_section $binfile" If you prefer your change, the `set debug_str_section` line should be removed. Best, Lancelot. > set result [remote_exec host "[gdb_find_objcopy] $args"] > set status [lindex $result 0] > set output [lindex $result 1] > -- > 2.25.4 >