This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649)
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>, Marek Polacek <mpolacek at redhat dot com>
- Date: Wed, 27 Apr 2011 16:23:21 +0100
- Subject: Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649)
- References: <4DB82F26.30801@redhat.com> <20110427150529.GA2489@adacore.com>
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