[patch, testsuite] require readline for gdb.linespec/explicit.exp tab-completion tests

Keith Seitz keiths@redhat.com
Thu Sep 17 18:50:00 GMT 2015


On 09/17/2015 12:28 AM, Sandra Loosemore wrote:
> Tab-completion tests require readline support.  The ones in
> gdb.base/completion.exp are already conditional, but the recently-added
> gdb.linespec/explicit.exp tests are not.  This patch fixes that, and
> also an obvious typo ("faill" -> "fail").  The patch is kind of long
> because I had to insert an "if" block and reindent, but there's nothing
> else going on here.  OK to commit?

I'm not a maintainer, but I wouldn't hesitate to commit this as obvious.
Thank you for catching (and fixing) that.

> 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.

Keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: explicit.exp-unique-function.patch
Type: text/x-patch
Size: 1583 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20150917/6ef525a1/attachment.bin>


More information about the Gdb-patches mailing list