From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16481 invoked by alias); 20 Dec 2018 05:50:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16471 invoked by uid 89); 20 Dec 2018 05:50:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*be, his, act X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Dec 2018 05:50:40 +0000 Received: by simark.ca (Postfix, from userid 112) id 41B0D1E7B1; Thu, 20 Dec 2018 00:50:38 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 316CC1E059; Thu, 20 Dec 2018 00:50:37 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 20 Dec 2018 05:50:00 -0000 From: Simon Marchi To: Joel Brobecker Cc: Philippe Waroquiers , gdb-patches@sourceware.org Subject: Re: [RFA] Ensure deterministic result order in gdb.ada/info_auto_lang.exp In-Reply-To: <20181220052958.GB12440@adacore.com> References: <20181201133810.9542-1-philippe.waroquiers@skynet.be> <1545255361.2974.2.camel@skynet.be> <20181220052958.GB12440@adacore.com> Message-ID: X-Sender: simark@simark.ca User-Agent: Roundcube Webmail/1.3.6 X-SW-Source: 2018-12/txt/msg00230.txt.bz2 On 2018-12-20 00:29, Joel Brobecker wrote: >> > Since both paths appear already normalized in my case, the test does fails for me and your patch >> > would fix it. I am 99% sure I am fine with your fix, I just want to make sure we are on the same >> > page. >> A mystery to me why paths are already normalized in your build ... >> What compilation command do you see in the gdb.log for some_c.c ? > > I think it depends how you configure your build, and where you do > your testing. That's why Simon asked you about it. > > Personally, I build and test out-of-tree, and this is the recommended > way. And the second important element is the fact that I use an > absolute > path to the configure script: > > $ cd /path/to/build > $ /path/to/src/configure [...] > $ make > > When you configure GDB that way, then the testsuite framework will > compile the C files by passing the absolute path to those C files. > For instance on example from my gdb.log file: > > | Executing on host: gcc [...] -c -g [snip snip] > /path/to/src/gdb/testsuite/gdb.base/gdb1090.c (timeout = 300) > > However, if you configure using a relative path to the configure > script, > things become different. With the same example, but configured using... > > $ cd /path/to/build > $ ../src/configure [...] > > ... the path given by the testsuite frame to GCC in order to compile > C files now includes these relative directory adjustments you are > seeing. Eg: > > | Executing on host: gcc [...] -c -g [...] > /path/to/bld/gdb/testsuite/../../../../act/gdb-public/gdb/testsuite/gdb.base/gdb1090.c > (timeout = 300) > > Whether it must be this way or not and why, I don't know. But I don't > think it's even worth exploring the idea of changing it. Then, I think it makes sense to normalize the paths in order to have a predictable output, regardless of how gdb was configured, as Philippe suggested. Are you also ok with his patch? Simon