From: Michael Snyder <msnyder@vmware.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: gdb_test_no_output
Date: Thu, 03 Jun 2010 18:39:00 -0000 [thread overview]
Message-ID: <4C07F6D6.8060809@vmware.com> (raw)
In-Reply-To: <20100603183605.GH20736@adacore.com>
Joel Brobecker wrote:
>> An oft-used feature of gdb_test is that, if the message string is
>> supplied but empty (""), no PASS/FAIL output is produced. This is
>> used when you want to give a command to gdb without actually testing
>> anything.
>
> It's very easy to implement the exact same behavior as gdb_test, but
> are we certain that this is a valuable capability? Looking at the
> documentation for that function, one can find:
>
> # MESSAGE is an optional message to be printed. If this is
> # omitted, then the pass/fail messages use the command string as the
> # message. (If this is the empty string, then sometimes we don't
> # call pass or fail at all; I don't understand this at all.)
>
> The current implementation seems inconsistent; but also I don't think
> that is really makes that much difference whether the test generates
> a result or not.
>
> But if that's what people want...
It used to be a frequently used "idiom" -- if you wanted to do a
"next", for instance, just to set up for the next thing that you
needed to test, you would say
gdb_test "next" "" ""
and it wouldn't add anything superfluous to the test output.
I'm currently looking at replacing the regexp part of those
usages with ".*", but the behavior in general is still useful,
I think.
Michael
prev parent reply other threads:[~2010-06-03 18:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 17:50 gdb_test_no_output Michael Snyder
2010-06-03 18:36 ` gdb_test_no_output Joel Brobecker
2010-06-03 18:39 ` Michael Snyder [this message]
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=4C07F6D6.8060809@vmware.com \
--to=msnyder@vmware.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/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