From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18947 invoked by alias); 25 Nov 2016 17:55:20 -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 18894 invoked by uid 89); 25 Nov 2016 17:55:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Nov 2016 17:55:18 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71A08CA62C; Fri, 25 Nov 2016 17:55:17 +0000 (UTC) Received: from [127.0.0.1] (ovpn03.gateway.prod.ext.phx2.redhat.com [10.5.9.3]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAPHtGZP002373; Fri, 25 Nov 2016 12:55:16 -0500 Subject: Re: [PATCH 1/8] Fixup testcases outputting own name as a test name To: Simon Marchi , Luis Machado 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> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <0b33f003-4d18-05dd-c74b-96d2026fcf2f@redhat.com> Date: Fri, 25 Nov 2016 17:55: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 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00828.txt.bz2 On 11/25/2016 05:48 PM, 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. Or just not pass anything about the target file? "failed to compile" works just as well, IMO. If you need more detail, it's in the gdb.log. > 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). Yes, that's what I was thinking. So that diffing test results of builds done on different directories doesn't come out with spurious hunks. > But since > it's only for error test names, I don't know if that's a real problem. IMO, it is. I'd rather if we aimed at not introducing more instances of this problem. Thanks, Pedro Alves