Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] testsuite: gdb.base/setshow.exp fix racy FAILs
@ 2009-06-30 18:08 Jan Kratochvil
  2009-06-30 18:15 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2009-06-30 18:08 UTC (permalink / raw)
  To: gdb-patches

Hi,

one cannot expect a string which is a substring of another expected string.


Thanks,
Jan


gdb/testsuite/
2009-06-30  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Remove racy FAILs relying just on the timeouts.
	* gdb.base/setshow.exp (set annotate 2, show annotate (2))
	(annotation_level 2): Remove racy FAILs.

--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -60,7 +60,6 @@ send_gdb "set annotate 2\n"
 gdb_expect {
 	-re ".*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \
 				{ pass "set annotate 2" }
- 	-re ".*$gdb_prompt $"	{ fail "set annotate 2" }
 	timeout			{ fail "(timeout) set annotate 2" }
     }
 
@@ -68,7 +67,6 @@ send_gdb "show annotate\n"
 gdb_expect {
 	-re ".*\032\032post-prompt.*Annotation_level is 2..*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \
 				{ pass "show annotate (2)" }
- 	-re ".*$gdb_prompt $"	{ fail "show annotate (2)" }
 	timeout			{ fail "(timeout) show annotate (2)" }
     }
 
@@ -77,7 +75,6 @@ send_gdb "info line 1\n"
 gdb_expect {
 	-re ".*\032\032post-prompt.*Line 1 of .* is at address .* but contains no code.*:1:0:beg:0x.*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \
 				{ pass "annotation_level 2" }
-	-re ".*$gdb_prompt $"	{ fail "annotation_level 2" }
 	timeout			{ fail "(timeout) annotation_level 2" }
     }
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] testsuite: gdb.base/setshow.exp fix racy FAILs
  2009-06-30 18:08 [patch] testsuite: gdb.base/setshow.exp fix racy FAILs Jan Kratochvil
@ 2009-06-30 18:15 ` Daniel Jacobowitz
  2009-06-30 18:29   ` Jan Kratochvil
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2009-06-30 18:15 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

On Tue, Jun 30, 2009 at 08:07:53PM +0200, Jan Kratochvil wrote:
> 2009-06-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	Remove racy FAILs relying just on the timeouts.
> 	* gdb.base/setshow.exp (set annotate 2, show annotate (2))
> 	(annotation_level 2): Remove racy FAILs.

OK.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] testsuite: gdb.base/setshow.exp fix racy FAILs
  2009-06-30 18:15 ` Daniel Jacobowitz
@ 2009-06-30 18:29   ` Jan Kratochvil
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kratochvil @ 2009-06-30 18:29 UTC (permalink / raw)
  To: gdb-patches

On Tue, 30 Jun 2009 20:15:43 +0200, Daniel Jacobowitz wrote:
> On Tue, Jun 30, 2009 at 08:07:53PM +0200, Jan Kratochvil wrote:
> > 2009-06-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	Remove racy FAILs relying just on the timeouts.
> > 	* gdb.base/setshow.exp (set annotate 2, show annotate (2))
> > 	(annotation_level 2): Remove racy FAILs.
> 
> OK.

Checked-in.
	http://sourceware.org/ml/gdb-cvs/2009-06/msg00203.html

Forgot to show the problem before, below now.


Thanks,
Jan


@@ -32121,9 +32088,9 @@ show annotate
 Annotation_level is 2.

 ^Z^Zpre-prompt
-(gdb) FAIL: gdb.base/setshow.exp: show annotate (2)
-
+(gdb)
 ^Z^Zprompt
+PASS: gdb.base/setshow.exp: show annotate (2)
 info line 1

 ^Z^Zpost-prompt
@@ -32132,9 +32099,9 @@ Line 1 of "../.././gdb/testsuite/gdb.bas
 ^Z^Zsource /.../gdb/testsuite/gdb.base/setshow.c:1:0:beg:0x4004fc

 ^Z^Zpre-prompt
-(gdb) FAIL: gdb.base/setshow.exp: annotation_level 2
-
+(gdb)
 ^Z^Zprompt
+PASS: gdb.base/setshow.exp: annotation_level 2
 set annotate 1

 ^Z^Zpost-prompt


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-30 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 18:08 [patch] testsuite: gdb.base/setshow.exp fix racy FAILs Jan Kratochvil
2009-06-30 18:15 ` Daniel Jacobowitz
2009-06-30 18:29   ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox