From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99876 invoked by alias); 17 Sep 2015 21:10:05 -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 99862 invoked by uid 89); 17 Sep 2015 21:10:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 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; Thu, 17 Sep 2015 21:10:03 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1ZcgRM-0003Xx-3B from Sandra_Loosemore@mentor.com ; Thu, 17 Sep 2015 14:10:00 -0700 Received: from [IPv6:::1] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Thu, 17 Sep 2015 14:09:59 -0700 Message-ID: <55FB2BF8.5090603@codesourcery.com> Date: Thu, 17 Sep 2015 21:10:00 -0000 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Keith Seitz CC: gdb-patches Subject: Re: [patch, testsuite] require readline for gdb.linespec/explicit.exp tab-completion tests References: <55FA6B97.4080209@codesourcery.com> <55FB0B6C.6010401@redhat.com> In-Reply-To: <55FB0B6C.6010401@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-09/txt/msg00430.txt.bz2 On 09/17/2015 12:50 PM, Keith Seitz wrote: > On 09/17/2015 12:28 AM, Sandra Loosemore wrote: > >> The immediate problem is that the response to the "break -function >> mai\t" test doesn't always include the ^G character in the output >> pattern, and the other FAILs are cascading off of the testcase not being >> structured to recover from a pattern match failure (it's sending more >> commands without a newline to terminate the one that failed). But, I >> have no clue why GDB is giving a ^G in some configurations and not >> others (I observed that this test fails on nios2-elf target but passes >> on nios2-linux-gnu, for instance), or whether this difference is >> indicative of an actual bug. So I've not touched that part of the >> testcase. > > Can you reliably reproduce the failure? I have been unable to do so > locally, but I have a couple of guesses why this test might fail. > > I've attached a patch where I've made two changes. First, I've switched > from using "main" as a unique completion to some goofy new function > where the name is hopefully truly unique. > > Second I believe the test is incorrect (or at least in combination with > some readline versions?). ^G is output only for non-unique completions. > So with this particular test, I don't think it should be present at all. > I've removed it in the patch. > > If you can reliably reproduce the failure, I sure would love to know > whether this patch helps at all. Your patch makes these tests all PASS on both nios2-elf (where it formerly FAILed due to not beeping) and nios2-linux-gnu (where it used to beep and PASS). I had come to pretty much the same conclusions -- I didn't think it was supposed to beep if there was a unique completion, and I thought there must be some sort of a duplicate symbol table entry for "main" on the Linux target coming from the startup code or something like that. But it looks to me like the completer *is* finding a unique completion after beeping anyway. So, while your patch does fix the FAILs, I'm wondering if there is a genuine code bug in the completer here; is it using different logic for deciding whether to beep than in what it does afterwards? Personally, I'd feel uncomfortable changing the testcase to use something other than "main" without understanding why it beeps in some configurations and not others, because that might just be papering over the bug instead of fixing a bad testcase. -Sandra