From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Michael Snyder <msnyder@vmware.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>,
Joel Brobecker <brobecker@adacore.com>,
Hui Zhu <teawater@gmail.com>
Subject: Re: Testing of reverse debug commands
Date: Sun, 12 Jul 2009 18:25:00 -0000 [thread overview]
Message-ID: <200907121925.05187.pedro@codesourcery.com> (raw)
In-Reply-To: <4A5A19FC.9050206@vmware.com>
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
next prev parent reply other threads:[~2009-07-12 18:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-12 0:44 Michael Snyder
2009-07-12 8:02 ` Joel Brobecker
2009-07-12 14:20 ` Pedro Alves
2009-07-12 14:29 ` Jan Kratochvil
2009-07-12 17:19 ` Michael Snyder
2009-07-12 18:19 ` Joel Brobecker
2009-07-12 18:25 ` Pedro Alves [this message]
2009-07-12 18:50 ` Marc Khouzam
2009-07-12 19:07 ` Pedro Alves
2009-07-12 19:26 ` Marc Khouzam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907121925.05187.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=msnyder@vmware.com \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox