From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GFl2CSD1O2NyTgUAWB0awg (envelope-from ) for ; Tue, 04 Oct 2022 04:56:00 -0400 Received: by simark.ca (Postfix, from userid 112) id 239501E112; Tue, 4 Oct 2022 04:56:00 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=weTydbNh; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C869F1E0D5 for ; Tue, 4 Oct 2022 04:55:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 66D233857C61 for ; Tue, 4 Oct 2022 08:55:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66D233857C61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664873758; bh=zawuII4HBjzxwNPZFD45iejieZlLQWOAA7GUNaB3lGo=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=weTydbNhVj0b+g57+Us1qK35+sRMSkJxo/IeEtkjUXU+At/iCJV5dMAXjH4PkmbIf Ufi+sabp7pCzdld4UPQ5AXKaRmGijTgRYnDIM0RLDsOOwXmgq0bGTcq1A9DR4aDybN t5ILTmKYn+S+kQkOGFd06dsHl+zppKfBo+7XNDR4= 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 DD8A23858413 for ; Tue, 4 Oct 2022 08:55:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD8A23858413 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-44-b0oA9t5-PbiPupoeKERnJQ-1; Tue, 04 Oct 2022 04:55:38 -0400 X-MC-Unique: b0oA9t5-PbiPupoeKERnJQ-1 Received: by mail-wr1-f70.google.com with SMTP id i26-20020adfaada000000b0022e2f38ffccso1870358wrc.14 for ; Tue, 04 Oct 2022 01:55:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=zawuII4HBjzxwNPZFD45iejieZlLQWOAA7GUNaB3lGo=; b=yOz1k0anCgSZ8/HUXxGKJfAONZIluQ/X5aA3kQZJxCelrf4lySzBw2tmuEG4SMYsHD +ZfZO+uq4rNrndIok3psa6aRs1GoXSpCqJ2gJNQUNnndOtPxZ2bhZq0h73wyafq14zrY w5RClyPP2SZTm2nEW83xY37DPVo2zKkI36E3JXvODFg4Gy3M7Y7xChNm6jnjCgBQTF/d yk2hJySjDTkyij0PoUh+kzWIb/qfarE5SbM3/GoLYxKQh3MXJReDdtG26qi4iu6azZ9E yhfDmhM33vHpCD6tVVAXvtK4XP+CTtX36DWAAXayLhuHzRQG/xda43Ge+Lj2Ccd+g6SL Q9FA== X-Gm-Message-State: ACrzQf1Hx3uIvyubU5zYixZ4gvd33DdhYTzi/IHOxK0p2WCUIzZmzUOP i3Ca5yOA7iHDuY5Xy1kJlFByH0iJG4xE05wiWJnn1m/t1rTnWjbG6iFThkHb6zV2GMB+2nxtMmn RmMGhVT7g3+je1dhwa8e0Qw== X-Received: by 2002:a05:6000:184e:b0:22e:4612:496d with SMTP id c14-20020a056000184e00b0022e4612496dmr3862774wri.91.1664873737432; Tue, 04 Oct 2022 01:55:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4sbQvDCVb3fOLwKPxpH9WawdMSx2cOPKcO69rfWUEsL/bP6u8hdNQDCB9fFT1SGPDl6PzXmw== X-Received: by 2002:a05:6000:184e:b0:22e:4612:496d with SMTP id c14-20020a056000184e00b0022e4612496dmr3862756wri.91.1664873737164; Tue, 04 Oct 2022 01:55:37 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id d16-20020adfe890000000b0022e035a4e93sm11205267wrm.87.2022.10.04.01.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 01:55:36 -0700 (PDT) To: Pedro Alves , Lancelot SIX Subject: Re: [PATCH 1/2] gdb/testsuite: avoid creating files in gdb/testsuite directory In-Reply-To: References: <337887b9594348c5880b7adbc0850e72e319e857.1664721741.git.aburgess@redhat.com> <20221003111213.rzfci537xl3xbfkw@octopus> <87bkqshoxf.fsf@redhat.com> Date: Tue, 04 Oct 2022 09:55:36 +0100 Message-ID: <87wn9geznb.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Pedro Alves writes: > On 2022-10-03 5:06 p.m., Andrew Burgess via Gdb-patches wrote: >> Lancelot SIX writes: >> > >>> 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. >> >> Good spot. >> >> Updated patch below. > > I'm glad you guys found this alternative approach. I was going to suggest > to see if we could avoid changing directory, the "cd" approach IMO should be > avoided if possible. The reason is that when you change gdb's directory to > the test's output dir, if GDB crashes and produces a core on teardown, then that core will > end up in the test's output directory, and thus won't be noticed by the spurious core > detection, i.e., won't be signaled in gdb.sum. Unfortunately, there were two temporary file issues, the first of these never used 'cd', and that's the one Lancelot commented on, and I've updated. The second patch, which is still on the table right now, uses 'cd'. However, I'll take your comment as feedback on patch 2/2 and see if I can come up with a better fix. Thanks, Andrew