From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by sourceware.org (Postfix) with ESMTPS id D4689385E454 for ; Mon, 21 Mar 2022 12:02:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D4689385E454 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-wr1-f50.google.com with SMTP id a1so18987843wrh.10 for ; Mon, 21 Mar 2022 05:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=tZua1fyhOvdWpyOx06TI6cWnnr+Imdi1MRTA0oELUQY=; b=Cao94tEIG3pEBaTew+0yYInNJWDVKH/TUnPxb82Cbm8hO4Hjoac6xITWHgcDTiPtSW v535XeZ5xAsbrPfLW7wbnxt8rAX4lVVyCpDrafe3GzW5KAbEba9/438z/GmxFD/BPhJ8 TzHtOq8G0LsiAb76RT00dTR3fbwFsxlZjvamoeKT9+stfyMnfjjAQT+1RMWlpFFsu2Zp EFjZUsSSzNY0IqxBSvmU+/NWYdI9coKRvFVwVa2VcccVBrv8nBSVE7FzVY9/7TnWLBpt LF9V1x4M/pAeLv0i/rKYh+myJm9wIxkTyVgIBTZuF6rhhb7S0nxBBEC/UPSe43bI3enA Ms6Q== X-Gm-Message-State: AOAM530uLCBXsvCSIYIjC03TV2MW5fTai+2f4pZLoqVkjcY066xqK143 GiifexeVfQDJ0T/DeET7kEWuXrZ9gd4= X-Google-Smtp-Source: ABdhPJxbUT+e1F6ocauXLnOATyU5G0Q95qTgZbJIkq/YXSDyp32S6CXlOj623dl9LTCEC1zTpwOP9A== X-Received: by 2002:a05:6000:144b:b0:204:d97:8d12 with SMTP id v11-20020a056000144b00b002040d978d12mr5165871wrx.572.1647864144709; Mon, 21 Mar 2022 05:02:24 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id g1-20020a1c4e01000000b003899c8053e1sm18047296wmh.41.2022.03.21.05.02.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 05:02:23 -0700 (PDT) Message-ID: Date: Mon, 21 Mar 2022 12:02:22 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] gdb/testsuite: Installed-GDB testing & data-directory Content-Language: en-US To: Andrew Burgess Cc: gdb-patches@sourceware.org References: <20220318161036.3290639-1-pedro@palves.net> <20220318162318.GR1212730@redhat.com> <87a6dmuah0.fsf@redhat.com> From: Pedro Alves In-Reply-To: <87a6dmuah0.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 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, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 21 Mar 2022 12:02:27 -0000 On 2022-03-18 23:06, Andrew Burgess wrote: > Pedro Alves writes: > >> On 2022-03-18 16:43, Pedro Alves wrote: >> >>> Do you disagree that what we suggest in testsuite/README: >>> >>> make check RUNTESTFLAGS=GDB=/usr/bin/gdb >>> >>> behaves incorrectly (in the sense that it does unsupportable things), >>> and we should instead suggest something that works correctly by default? >>> >>> My first approach was to just let users override GDB_DATA_DIRECTORY, and >>> thus tweak the README to read: >>> >>> make check RUNTESTFLAGS="GDB=/usr/bin/gdb GDB_DATA_DIRECTORY=" >>> >>> but then extending the README text to explain this felt pretty awkward and I >>> realized that we should probably default GDB_DATA_DIRECTORY to "" if >>> GDB was overridden, and then things would work for 99% of the users. >>> >>> I admit I didn't think people were using this the way you are using it. >> >> Below's what such an approach looks like. This works for us as well, >> we just have to pass the GDB_DATA_DIRECTORY= explicitly, which isn't as >> nice, but isn't a big deal. >> >> Let me know what you think. > > Sure, the default behaviour works for me just fine. But I suspect I > might be being unreasonable asking you to change this. Like you point > out, really, it's me who's relying on undefined behaviour, so, it's > probably me being unreasonable asking you to change approach. > > Feel free to go with whatever approach you think is best, I'm sure I'll > adapt just fine. Thanks Andrew, I appreciate it. I still prefer v1. With either master or v2, if you specify GDB, but not GDB_DATA_DIRECTORY, then the data directory used is _always_ wrong, while with v1, it is correct for installed GDBs. I'll push v1 to master in a bit. Pedro Alves