Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp
@ 2001-09-28 15:47 Daniel Jacobowitz
  2001-10-01  7:57 ` Fernando Nasser
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-09-28 15:47 UTC (permalink / raw)
  To: gdb-patches

This one was a real nuisance to find...

mi_gdb_test expects strings without the trailing newline.  If there is a
trailing newline, we'll get two prompts back.  In some cases, depending on
the delicacy of timing, this can cause a problem.  The output looks like:

47show architecture

&"show architecture\n"
~"The target architecture is assumed to be i386\n"
47^done
(gdb)
&"\n"
^done
(gdb)


As best I can tell, this hits a bug (feature?) in the regular expression
matcher involving greedy matches.  The .*" sequence in the test matches from
the beginning of ' is assumed' all the way down to the second '&"\n"'.  Thus
the ^done bit does not match successfully.

Removing the unnecessary newlines masks the bug, as best as my tests can
tell.  OK to commit?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2001-09-28  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.mi/mi-hack-cli.exp: Remove excess newlines from test strings.
	* gdm.mi/mi0-hack-cli.exp: Likewise.

Index: gdb.mi/mi-hack-cli.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-hack-cli.exp,v
retrieving revision 1.4
diff -u -r1.4 mi-hack-cli.exp
--- mi-hack-cli.exp	2001/06/23 21:47:09	1.4
+++ mi-hack-cli.exp	2001/09/28 22:38:46
@@ -28,11 +28,11 @@
     continue
 }
 
-mi_gdb_test "show architecture\n" \
+mi_gdb_test "show architecture" \
 	"&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
 	"show architecture"
 
-mi_gdb_test "47show architecture\n" \
+mi_gdb_test "47show architecture" \
 	"&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
 	"47show architecture"
 
Index: gdb.mi/mi0-hack-cli.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi0-hack-cli.exp,v
retrieving revision 1.3
diff -u -r1.3 mi0-hack-cli.exp
--- mi0-hack-cli.exp	2001/06/23 21:47:09	1.3
+++ mi0-hack-cli.exp	2001/09/28 22:38:46
@@ -28,11 +28,11 @@
     continue
 }
 
-mi_gdb_test "show architecture\n" \
+mi_gdb_test "show architecture" \
 	"&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
 	"show architecture"
 
-mi_gdb_test "47show architecture\n" \
+mi_gdb_test "47show architecture" \
 	"&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
 	"47show architecture"
 


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

* Re: [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp
  2001-09-28 15:47 [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp Daniel Jacobowitz
@ 2001-10-01  7:57 ` Fernando Nasser
  2001-10-01  8:33   ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Fernando Nasser @ 2001-10-01  7:57 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz wrote:
> 
> This one was a real nuisance to find...
> 
> mi_gdb_test expects strings without the trailing newline.  If there is a
> trailing newline, we'll get two prompts back.  In some cases, depending on
> the delicacy of timing, this can cause a problem.  The output looks like:
> 
> 47show architecture
> 
> &"show architecture\n"
> ~"The target architecture is assumed to be i386\n"
> 47^done
> (gdb)
> &"\n"
> ^done
> (gdb)
> 
> As best I can tell, this hits a bug (feature?) in the regular expression
> matcher involving greedy matches.  The .*" sequence in the test matches from
> the beginning of ' is assumed' all the way down to the second '&"\n"'.  Thus
> the ^done bit does not match successfully.
> 
> Removing the unnecessary newlines masks the bug, as best as my tests can
> tell.  OK to commit?
> 

Sure, lets try it.

Thanks Daniel.

Fernando




> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
> 
> 2001-09-28  Daniel Jacobowitz  <drow@mvista.com>
> 
>         * gdb.mi/mi-hack-cli.exp: Remove excess newlines from test strings.
>         * gdm.mi/mi0-hack-cli.exp: Likewise.
> 
> Index: gdb.mi/mi-hack-cli.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-hack-cli.exp,v
> retrieving revision 1.4
> diff -u -r1.4 mi-hack-cli.exp
> --- mi-hack-cli.exp     2001/06/23 21:47:09     1.4
> +++ mi-hack-cli.exp     2001/09/28 22:38:46
> @@ -28,11 +28,11 @@
>      continue
>  }
> 
> -mi_gdb_test "show architecture\n" \
> +mi_gdb_test "show architecture" \
>         "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
>         "show architecture"
> 
> -mi_gdb_test "47show architecture\n" \
> +mi_gdb_test "47show architecture" \
>         "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
>         "47show architecture"
> 
> Index: gdb.mi/mi0-hack-cli.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi0-hack-cli.exp,v
> retrieving revision 1.3
> diff -u -r1.3 mi0-hack-cli.exp
> --- mi0-hack-cli.exp    2001/06/23 21:47:09     1.3
> +++ mi0-hack-cli.exp    2001/09/28 22:38:46
> @@ -28,11 +28,11 @@
>      continue
>  }
> 
> -mi_gdb_test "show architecture\n" \
> +mi_gdb_test "show architecture" \
>         "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
>         "show architecture"
> 
> -mi_gdb_test "47show architecture\n" \
> +mi_gdb_test "47show architecture" \
>         "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
>         "47show architecture"
> 

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

* Re: [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp
  2001-10-01  7:57 ` Fernando Nasser
@ 2001-10-01  8:33   ` Andrew Cagney
       [not found]     ` <3BCA222A.2050601@cygnus.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2001-10-01  8:33 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Daniel Jacobowitz, gdb-patches

> Removing the unnecessary newlines masks the bug, as best as my tests can
>> tell.  OK to commit?
>> 
> 
> 
> Sure, lets try it.

Um, I'd actually like to study this one in more detail

Andrew



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

* Re: [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp
       [not found]     ` <3BCA222A.2050601@cygnus.com>
@ 2001-10-14 16:47       ` Daniel Jacobowitz
  2001-10-27 17:31         ` Daniel Jacobowitz
  2001-10-28 10:01         ` Daniel Jacobowitz
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-10-14 16:47 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Fernando Nasser, gdb-patches

On Sun, Oct 14, 2001 at 07:39:22PM -0400, Andrew Cagney wrote:
> I wrote:
> 
> >Um, I'd actually like to study this one in more detail
> 
> Daniel wrote:
> 
> >This one was a real nuisance to find...
> >
> >mi_gdb_test expects strings without the trailing newline.  If there is a
> >trailing newline, we'll get two prompts back.  In some cases, depending on
> >the delicacy of timing, this can cause a problem.  The output looks like:
> >
> >47show architecture
> >
> >&"show architecture\n"
> >~"The target architecture is assumed to be i386\n"
> >47^done
> >(gdb)
> >&"\n"
> >^done
> >(gdb)
> >
> >Removing the unnecessary newlines masks the bug, as best as my tests can
> >tell.  OK to commit?
> 
> (sorry for the delay).
> 
> More to the point, it shouldn't send the blank line anyway
> Yes, ok.  I think 5.1 branch as well since a random pass/fail will 
> confuse people trying to report test results.

OK, I'll do that on Monday.  If no one objects (why would anyone
object? :) I'm going to put my other recent testsuite fixes on the
branch too; they fix timeout issues, and it's much more convenient to
run the testsuite after they're applied.  Is that OK?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp
  2001-10-14 16:47       ` Daniel Jacobowitz
@ 2001-10-27 17:31         ` Daniel Jacobowitz
  2001-10-28 10:01         ` Daniel Jacobowitz
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-10-27 17:31 UTC (permalink / raw)
  To: Andrew Cagney, Fernando Nasser, gdb-patches

On Sun, Oct 14, 2001 at 07:48:05PM -0400, Daniel Jacobowitz wrote:
> On Sun, Oct 14, 2001 at 07:39:22PM -0400, Andrew Cagney wrote:
> > (sorry for the delay).
> > 
> > More to the point, it shouldn't send the blank line anyway
> > Yes, ok.  I think 5.1 branch as well since a random pass/fail will 
> > confuse people trying to report test results.
> 
> OK, I'll do that on Monday.  If no one objects (why would anyone
> object? :) I'm going to put my other recent testsuite fixes on the
> branch too; they fix timeout issues, and it's much more convenient to
> run the testsuite after they're applied.  Is that OK?

Oops.  I seem to have forgotten about this patch; I've committed it to
the trunk now.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp
  2001-10-14 16:47       ` Daniel Jacobowitz
  2001-10-27 17:31         ` Daniel Jacobowitz
@ 2001-10-28 10:01         ` Daniel Jacobowitz
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2001-10-28 10:01 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Cagney, Fernando Nasser

On Sun, Oct 14, 2001 at 07:48:05PM -0400, Daniel Jacobowitz wrote:
> OK, I'll do that on Monday.  If no one objects (why would anyone
> object? :) I'm going to put my other recent testsuite fixes on the
> branch too; they fix timeout issues, and it's much more convenient to
> run the testsuite after they're applied.  Is that OK?

No one objected, so I did this.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

end of thread, other threads:[~2001-10-28 10:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-28 15:47 [rfa/testsuite/mi] Fix transient failures in mi*-hack-cli.exp Daniel Jacobowitz
2001-10-01  7:57 ` Fernando Nasser
2001-10-01  8:33   ` Andrew Cagney
     [not found]     ` <3BCA222A.2050601@cygnus.com>
2001-10-14 16:47       ` Daniel Jacobowitz
2001-10-27 17:31         ` Daniel Jacobowitz
2001-10-28 10:01         ` Daniel Jacobowitz

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