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 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) From: Andrew Burgess To: Pedro Alves , Lancelot SIX Cc: gdb-patches@sourceware.org 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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 08:55:40 -0000 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