From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12590 invoked by alias); 25 Nov 2016 17:53:08 -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 12567 invoked by uid 89); 25 Nov 2016 17:53:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1960, reproducibility, errorprone, Pedro's X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Nov 2016 17:53:06 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cAKgL-0002DO-9g from Luis_Gustavo@mentor.com ; Fri, 25 Nov 2016 09:53:05 -0800 Received: from [172.30.6.103] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 25 Nov 2016 09:53:02 -0800 Reply-To: Luis Machado Subject: Re: [PATCH 1/8] Fixup testcases outputting own name as a test name References: <1480093744-13771-1-git-send-email-lgustavo@codesourcery.com> <1480093744-13771-2-git-send-email-lgustavo@codesourcery.com> <2b7ca30d-f563-dd11-7934-60505d261a24@codesourcery.com> <5cfc70b2ea19762c664d61f752c02a41@polymtl.ca> To: Simon Marchi CC: Pedro Alves , From: Luis Machado Message-ID: Date: Fri, 25 Nov 2016 17:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <5cfc70b2ea19762c664d61f752c02a41@polymtl.ca> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00827.txt.bz2 On 11/25/2016 11:48 AM, Simon Marchi wrote: > On 2016-11-25 12:37, Luis Machado wrote: >>> I think all these references to $binfile will put the full file >>> path on gdb.sum? I think you want $testfile instead. >>> >>> Thanks, >>> Pedro Alves >>> >> >> They will, which may make it easier to just build the files by hand >> with the output from the log file. But it has the potential to be a >> big path. >> >> I'm fine with either approach. > > I think it's fine how you did in the patch. Most of the time, binfile > is based on testfile, so Pedro's suggestion would work. But sometimes, > we pass something else than binfile as the compilation destination (or > binfile was overrident), so we would have to remember to use something > else than testfile to build the error message, it seems easy to forget. > I think that consistently using the same expression as is passed to > gdb_compile's dest parameter is a good approach. Or maybe the error > should be handled in gdb_compile instead of in each individual test, > that would be even less error-prone. > > Of course, that doesn't hold if the issue about having the full paths in > the test message is about the reproducibility (test names will have > different names depending on the path where you build gdb). But since > it's only for error test names, I don't know if that's a real problem. That's good input. Honestly i started with the idea of having a "try_gdb_compile" error out a standard message, but then i noticed gdb's testsuite is all over the place in terms of outputting compilation errors. Some tests output messages, others don't (but could) and some others don't want to output because gdb_compile is part of a multi-condition conditional block. I think it is another case where it would be nice to do a cleanup and have every testcase use a standard structure/skeleton. I'll go with outputting $testfile then.