This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch, testsuite] skip tab-completion tests if no readline
- From: Tom Tromey <tom at tromey dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>
- Date: Wed, 19 Sep 2018 06:56:37 -0600
- Subject: Re: [patch, testsuite] skip tab-completion tests if no readline
- References: <ae3d90cf-0096-18fc-a004-68c6888c50b7@codesourcery.com>
>>>>> "Sandra" == Sandra Loosemore <sandra@codesourcery.com> writes:
Sandra> I found a bunch of borked tab-completion tests when running tests on a
Sandra> remote Windows host, where the input stream is not a tty and has no
Sandra> readline support. I've copied the test for readline support verbatim
Sandra> from the older gdb.base/completion.exp testcase into these newer
Sandra> testcases. OK to commit?
Actually, I had a couple thoughts just as I hit send...
Sandra> # This file is part of the gdb testsuite.
Sandra> +# Tests below are about tab-completion, which doesn't work if readline
Sandra> +# library isn't used. Check it first.
Sandra> +
Sandra> +if { ![readline_is_used] } {
Sandra> + return -1
Sandra> +}
Perhaps the early returns should call "untested". I'm on the fence
about this, sometimes it is done, sometimes not. I don't know if it
matters to anybody -- I never really look at these lines.
https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#A.22untested.22_calls
Second, this particular check runs early. I wonder if readline_is_used
actually works at this spot, because I would imagine gdb isn't running yet.
What does "runtest cpls-ops.exp" do?
Tom