This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, testsuite] skip tab-completion tests if no readline


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]