From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 257833857B9A for ; Tue, 4 Oct 2022 14:20:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 257833857B9A Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-658-_g8jEnnsP4uPI4GDT7gwTA-1; Tue, 04 Oct 2022 10:20:21 -0400 X-MC-Unique: _g8jEnnsP4uPI4GDT7gwTA-1 Received: by mail-wm1-f72.google.com with SMTP id d5-20020a05600c34c500b003b4fb42ccdeso10962597wmq.8 for ; Tue, 04 Oct 2022 07:20:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=niNiDpAF9ISlAIBAzBwSIR50x6MmA0/laZdtoOzDNN8=; b=hlxNQYaTjYdJgvjT9y741NVohU8q0NsN8uy0UvNGoJ7MHVASnUGGDGy0+RVwo/HQts LHrtqzBuVrZ9tOHkcAh99X/lIYlW6J/zI3uq+Q4Z0yTH04qz1d1eQ7qlg1RMT+ngwZvG YJUFOs8rudiCIQHesBEhH0C0voaxOlw4N7a0UfHGkuBKqX3nQ6Yz6ILWAJQ1ieNNUqzf Ot6bOs9UCviiV1nfJ7tXc4nxi1+7wVbClGnNa6Xyau26IOJl4VWdUy+izFdpdKehf70x xFz1Wk3GYNdR3PAw0Uwp5DgovORuHCjzAd7JBUsiOjSeDJ4etkIfa8FkfqHqxh3J84vY E9YQ== X-Gm-Message-State: ACrzQf156U/bqZl9tIposrH/B4HItE/VL0aHSzx4l3Q0sEKM/mmDXo7T H+APUdfaG7WdiPyTNHkXPZ3ylyzBK5wRorevMi+eAGrvvRy2RrbRGMneqPtBWxIKDxqUjOXEh1Z qZrOcV9WssBkMvjPFhL6Zg0sZVZk827Qf20YTLu0Zlmaqd7XZydIswPtCpX7n7i9ZxEwf7o9wKQ == X-Received: by 2002:a5d:59a5:0:b0:22e:37ab:ed7d with SMTP id p5-20020a5d59a5000000b0022e37abed7dmr7063935wrr.461.1664893218750; Tue, 04 Oct 2022 07:20:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5tDQm63wnUOC/zvmBqzXn7Pvmq0Lb+wB4iF7F8ef674UEyhdGzRehfygdbZz1J/iiWoA03bg== X-Received: by 2002:a5d:59a5:0:b0:22e:37ab:ed7d with SMTP id p5-20020a5d59a5000000b0022e37abed7dmr7063922wrr.461.1664893218496; Tue, 04 Oct 2022 07:20:18 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id q22-20020a1ce916000000b003b56be51313sm14919800wmc.44.2022.10.04.07.20.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 07:20:17 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCHv2 1/2] gdb/testsuite: avoid creating files in gdb/testsuite directory Date: Tue, 4 Oct 2022 15:20:13 +0100 Message-Id: <8e855f184d30f17a7bd0638f6cb8ee211be789e2.1664893145.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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: Tue, 04 Oct 2022 14:20:24 -0000 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. --- 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] -- 2.25.4