From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0915A3894E47 for ; Wed, 29 Apr 2020 18:23:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0915A3894E47 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.193] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6AAE71F068; Wed, 29 Apr 2020 14:22:59 -0400 (EDT) Subject: Re: [PATCHv2 0/3] Automatic detection of test name problems To: Keith Seitz , Andrew Burgess Cc: gdb-patches@sourceware.org References: <290d0de3-264b-9a60-487f-ff6b484c35f1@redhat.com> <20200429090216.GI3522@embecosm.com> <20200429153852.GL3522@embecosm.com> From: Simon Marchi Message-ID: <6f61fb96-6f21-b05a-efb4-e4426e976fd8@simark.ca> Date: Wed, 29 Apr 2020 14:22:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 29 Apr 2020 18:23:01 -0000 On 2020-04-29 12:03 p.m., Keith Seitz wrote: > On 4/29/20 8:38 AM, Andrew Burgess wrote: >> * Simon Marchi [2020-04-29 11:04:40 -0400]: >> >>> When you detect an offender, do you think you could print something? A bit like a "FAIL" >>> is printed when a test fails. For example: >>> >>> DUPLICATE: gdb.base/break.exp: set convenience variable $foo to 81.5 >>> >>> That would make it easier to spot the problematic test(s). But even without that, your >>> patchset looks good and useful to me. > > That is a great idea, Simon. [Again -- why didn't I think of that?] > >> However, I chose to print "DUPLICATE: ...." for _every_ duplicate, so >> you would get this: >> >> PASS: foo >> PASS: foo >> DUPLICATE: foo >> PASS: foo >> DUPLICATE: foo >> PASS: bar >> PASS: bar >> DUPLICATE: bar >> PASS: bar >> DUPLICATE: bar >> >> Obviously we don't get a DUPLICATE message for the first 'foo', or the >> first 'bar', we can't know by that point that these are going to be >> duplicated. >> >> But, it might be confusing that this test will report 2 duplicates, >> but contain 4 DUPLICATE lines. Would it in fact be better to report a >> count of 4 in this case I wonder? > > I don't really care one way or the other. This is an exceptional case, and > is /far/ less offensive than, e.g., assertions aborting gdb. Seeing messages > just reinforces the message IMO. YMMV. I also don't mind, as long as it pops in my face. It could be printed only once and it would be enough. This looks good to me: DUPLICATE: gdb.base/break.exp: set convenience variable $foo to 81.5 DUPLICATE: gdb.base/break.exp: set breakpoint via non-integer convenience variable disallowed Simon