gdb_test_no_output
Michael Snyder
msnyder@vmware.com
Thu Jun 3 18:39:00 GMT 2010
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
More information about the Gdb
mailing list