[patch, testsuite] skip tab-completion tests if no readline
Tom Tromey
tom@tromey.com
Wed Sep 19 12:57:00 GMT 2018
>>>>> "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
More information about the Gdb-patches
mailing list