From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by sourceware.org (Postfix) with ESMTPS id D7B023858D38 for ; Mon, 3 Oct 2022 18:51:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D7B023858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id o5so7598441wms.1 for ; Mon, 03 Oct 2022 11:51:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date; bh=oG8BHQjmyThdcEQFhiBT9WJsOwpHLWMNGKtaUdft9Og=; b=0nB9Mv7gQcug48AlNPNdCJWlYJXY4YlEAAvTkaqTWk6yM/zlphsUj332of0DhhQYU8 sMIdSBd41+04BvGp7hIFh15hycYCKsRbMLVOyn5c6lMoZQpAz8ZWl3abh7azFpCRnZBM EBAf8cKbus9uiLQhyTnWdYryauirvr3fgl7yD8Dvdf73aWUiMb/hBeia6k8SCuYtSs+h aoRbKb7+EN8saPo4PjRPzIfbfM7Y9PVczQ1yvrbAKz0bIIcaWfaM9iTiwko2onxllwM3 i6ad2T+Gneb/p011JkB/8FeVfEU+fQ5K7EEVju3jxORUJvmcDFngp6VCye3QF5Fj/XIU DFrw== X-Gm-Message-State: ACrzQf1+7umzNxPL/acveFHnYxflZ47sWo2hEX8zfcc9ssFAmyO8ilPC W0wIeYDH02wrp1CPc2B0ZwhyStrwQUA= X-Google-Smtp-Source: AMsMyM7/UrmueeIyCGaSjpfgheJp6hyECbvj6CnW3J/NxDtAW/+fYyPGWr6L4lCFJ6QNgNonHFJ/Lw== X-Received: by 2002:a05:600c:2241:b0:3b4:88aa:dcba with SMTP id a1-20020a05600c224100b003b488aadcbamr7832344wmm.203.1664823116011; Mon, 03 Oct 2022 11:51:56 -0700 (PDT) Received: from ?IPv6:2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653? ([2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653]) by smtp.gmail.com with ESMTPSA id p8-20020a05600c358800b003b4868eb71bsm18418997wmq.25.2022.10.03.11.51.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Oct 2022 11:51:54 -0700 (PDT) Subject: Re: [PATCH 1/2] gdb/testsuite: avoid creating files in gdb/testsuite directory To: Andrew Burgess , Lancelot SIX Cc: gdb-patches@sourceware.org References: <337887b9594348c5880b7adbc0850e72e319e857.1664721741.git.aburgess@redhat.com> <20221003111213.rzfci537xl3xbfkw@octopus> <87bkqshoxf.fsf@redhat.com> From: Pedro Alves Message-ID: Date: Mon, 3 Oct 2022 19:51:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <87bkqshoxf.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 18:51:59 -0000 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.