* [patch] gdb.base/pending.exp replace gdb_test_multi
@ 2010-06-04 22:16 Michael Snyder
2010-06-07 22:51 ` Jan Kratochvil
0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2010-06-04 22:16 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 27 bytes --]
This is a simplification.
[-- Attachment #2: pending.txt --]
[-- Type: text/plain, Size: 882 bytes --]
2010-06-04 Michael Snyder <msnyder@vmware.com>
* gdb.base/pending.exp: Replace gdb_test_multiple with gdb_test.
Index: pending.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pending.exp,v
retrieving revision 1.20
diff -u -p -r1.20 pending.exp
--- pending.exp 1 Jun 2010 21:29:21 -0000 1.20
+++ pending.exp 4 Jun 2010 22:13:08 -0000
@@ -123,11 +123,11 @@ gdb_test "info break" \
#
# Test not setting a pending breakpoint
#
-gdb_test_multiple "break pendfunc2" "Don't set pending breakpoint" {
- -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
- gdb_test "n" "" "Don't set pending breakpoint"
- }
-}
+gdb_test "break pendfunc2" \
+ "" \
+ "Don't set pending breakpoint" \
+ ".*Make breakpoint pending.*y or \\\[n\\\]. $" \
+ "n"
#
# Add condition to pending breakpoint
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] gdb.base/pending.exp replace gdb_test_multi
2010-06-04 22:16 [patch] gdb.base/pending.exp replace gdb_test_multi Michael Snyder
@ 2010-06-07 22:51 ` Jan Kratochvil
2010-06-07 23:00 ` Michael Snyder
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2010-06-07 22:51 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
On Sat, 05 Jun 2010 00:16:42 +0200, Michael Snyder wrote:
> This is a simplification.
> -gdb_test_multiple "break pendfunc2" "Don't set pending breakpoint" {
> - -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
> - gdb_test "n" "" "Don't set pending breakpoint"
> - }
> -}
> +gdb_test "break pendfunc2" \
> + "" \
> + "Don't set pending breakpoint" \
> + ".*Make breakpoint pending.*y or \\\[n\\\]. $" \
> + "n"
With ".*" vs. gdb_test_no_output distinguishing now should be ".*" here
instead? (Maybe a more specific string would be also appropriate.)
Thanks,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] gdb.base/pending.exp replace gdb_test_multi
2010-06-07 22:51 ` Jan Kratochvil
@ 2010-06-07 23:00 ` Michael Snyder
2010-06-08 17:34 ` Jan Kratochvil
0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2010-06-07 23:00 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
Jan Kratochvil wrote:
> On Sat, 05 Jun 2010 00:16:42 +0200, Michael Snyder wrote:
>> This is a simplification.
>
>> -gdb_test_multiple "break pendfunc2" "Don't set pending breakpoint" {
>> - -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
>> - gdb_test "n" "" "Don't set pending breakpoint"
>> - }
>> -}
>> +gdb_test "break pendfunc2" \
>> + "" \
>> + "Don't set pending breakpoint" \
>> + ".*Make breakpoint pending.*y or \\\[n\\\]. $" \
>> + "n"
>
> With ".*" vs. gdb_test_no_output distinguishing now should be ".*" here
> instead? (Maybe a more specific string would be also appropriate.)
No, unfortunately, the expected string here is the empty string;
if we had said "y" to the query, then there would be some output
for us to look for.
Believe me, it's almost heart-breaking for me to have to leave this,
but I don't see it as worthwhile to extend gdb_test_no_output to
handle the query case.
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] gdb.base/pending.exp replace gdb_test_multi
2010-06-07 23:00 ` Michael Snyder
@ 2010-06-08 17:34 ` Jan Kratochvil
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kratochvil @ 2010-06-08 17:34 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
On Tue, 08 Jun 2010 01:00:03 +0200, Michael Snyder wrote:
> Jan Kratochvil wrote:
> >On Sat, 05 Jun 2010 00:16:42 +0200, Michael Snyder wrote:
> >>+gdb_test "break pendfunc2" \
> >>+ "" \
> >>+ "Don't set pending breakpoint" \
> >>+ ".*Make breakpoint pending.*y or \\\[n\\\]. $" \
> >>+ "n"
> >
> >With ".*" vs. gdb_test_no_output distinguishing now should be ".*" here
> >instead? (Maybe a more specific string would be also appropriate.)
>
> No, unfortunately, the expected string here is the empty string;
OK, it is a string after the question, not before it, my mistake.
> Believe me, it's almost heart-breaking for me to have to leave this,
> but I don't see it as worthwhile to extend gdb_test_no_output to
> handle the query case.
During the gdb_test_no_output introduction there was not the "" -> ".*" change
in place. Don't you plan to remove gdb_test_no_output now and put that
[string_to_regexp $command] into each gdb_test (gdb_test_multiple)?
That would solve even this case.
(For testing GDB asks at all there is "pendfunc1" before this test so dropping
this part of the test as you did is probably not a problem.)
Thanks,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-08 17:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-04 22:16 [patch] gdb.base/pending.exp replace gdb_test_multi Michael Snyder
2010-06-07 22:51 ` Jan Kratochvil
2010-06-07 23:00 ` Michael Snyder
2010-06-08 17:34 ` Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox