This is the mail archive of the gdb@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: Testing of reverse debug commands


On Sunday 12 July 2009 18:14:36, Michael Snyder wrote:
> Jan Kratochvil wrote:
> > On Sun, 12 Jul 2009 10:01:45 +0200, Joel Brobecker wrote:
> >>>     gdb_test "record" "" "Turn on process record"
> >>>     # FIXME: command ought to acknowledge, so we can test if it succeeded.
> >> This is just a shot in the dark since I really don't have much time
> >> to double-check this, but does gdb_test_multiple allow you to verify
> >> that no output was generated? For some reason, I thought it did.
> > 
> > This one works but not sure if it cannot have some problems:
> > 
> > set cmd "set verbose 0"
> > gdb_test $cmd "[string_to_regexp $cmd]"
> 
> Hmm, ok, three people so far have responded with
> work-arounds (thanks).
> 
> Does that mean y'all lean toward NOT making the
> commands generate some output of their own?

We have many other commands that are silent on success, and we
still test them.  The important question is: would *users* find
some output useful, not if the testsuite would.  In this case, I've
no real opinion.

Assuming no extra verbosity, if you expect that *only* the gdb
prompt is output, then you know that you had success.  The issue
with that hunk you pasted above, is that gdb_test "" eats any and
all output before the prompt, so you can't use it, because
you'd eat errors as well.  Well, as they say: then don't do it.

Do you agree with the point I raised about not being able to
query the status of recording at any time?  If we had such a
way, I'd suggest checking if recording was in fact enabled
with it, just like:

 http://sourceware.org/ml/gdb-patches/2009-06/msg00012.html

-- 
Pedro Alves


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