From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23718 invoked by alias); 27 Apr 2011 15:23:38 -0000 Received: (qmail 23704 invoked by uid 22791); 27 Apr 2011 15:23:37 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Apr 2011 15:23:22 +0000 Received: (qmail 24954 invoked from network); 27 Apr 2011 15:23:22 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 27 Apr 2011 15:23:22 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649) Date: Wed, 27 Apr 2011 15:23:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.2; x86_64; ; ) Cc: Joel Brobecker , Marek Polacek References: <4DB82F26.30801@redhat.com> <20110427150529.GA2489@adacore.com> In-Reply-To: <20110427150529.GA2489@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104271623.21862.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00511.txt.bz2 On Wednesday 27 April 2011 16:05:29, Joel Brobecker wrote: > > Thus, my point is that we could replace those "send_gdb + sleep + > > gdb_expect" sequences with just one gdb_test{,multiple,no_output}. I > > don't know yet if this transformation is possible for every test in > > the completion.exp file. Maybe the changes would be quite dramatical. > > However, this test would be _much_ simpler and much faster. Also, the > > current formatting is ugly ;). > > > > So, do you think this is a good idea? Is there something I'm missing? > > I don't know the history of the testcase, and this is only my own > opinion, but I tend to agree with you. I think we should keep one > test with \t, to make sure that a tab does trigger the completion, > but the rest of the testcase should be using the "complete" command. > That's what we do at AdaCore anyways... How to fix the race that Marek is seeing in that leftover \t instance? Marek wrote: > The '\t's do not work well with char-wise read1() and thus > they're occasionally causing problems. What are these problems exactly? I also wonder what's the rationale for the sleeps in the current implementation? > # tests for command completion > # > # Here are some useful test cases for completion. > # They should be tested with both M-? and TAB. An idea would be for the test to exercise all supported completion methods (using a convenience procedure, not duplicating the tests!). -- Pedro Alves