Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: [rfa/testsuite/mi] Recognize a few incorrect outputs
Date: Fri, 28 Sep 2001 12:15:00 -0000	[thread overview]
Message-ID: <20010928151616.A14106@nevyn.them.org> (raw)

The last two tests which timed out instead of failing on my system were
mi-var-display.exp and mi0-var-display.exp.  The regular expressions were
overly precise; the test would pass if the compiler's debug info marked the
first line of incr_a as being the assignment, but failed (and timed out) if
the first line was considered the opening brace.  I've made the latter case
a FAIL for now, since it means we stop before we can validly get a
backtrace.  After the attached patch, GCC 3.0 passes the test and GCC 2.95.3
fails it without a timeout (both i386-linux).

For the curious, before this and the two other patches I've submitted in the
past 24 hours, a testsuite run took 40:42.40.  Now it takes 5:46.87.  I like
this much better.  It could be cut down somewhat more, I expect:
	91.81s user 22.74s system 33% cpu
but removing sleeps is somewhat risky and we have no good way for sub-second
sleeps; and they're probably inappropriate on remote targets anyway.

<gripe>
A lot of GDB tests seem to be written with only pass and timeout
alternatives, or only with overly-specialized fails.  The hypocrite-alert
readers of this message will note that I'm guilty of the same thing; this is
Just Enough to make them catch a few errors I could think of, not enough to
recognize completely wrong output.  Someday, someone more motivated than I
should clean this up.
</gripe>

Is this 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-var-display.exp (continue to incr_a):  Recognize
	some incorrect output instead of timing out.
	* gdb.mi/mi-var-display.exp (continue to incr_a):  Likewise.

Index: gdb.mi/mi-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v
retrieving revision 1.5
diff -u -r1.5 mi-var-display.exp
--- mi-var-display.exp	2001/08/19 01:23:43	1.5
+++ mi-var-display.exp	2001/09/28 19:03:41
@@ -591,6 +591,10 @@
     -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
 	pass "continue to incr_a"
     }
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
+	# Compiler debug info is wrong...
+	fail "continue to incr_a"
+    }
     timeout {
 	fail "continue to incr_a (timeout)"
     }
Index: gdb.mi/mi0-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi0-var-display.exp,v
retrieving revision 1.4
diff -u -r1.4 mi0-var-display.exp
--- mi0-var-display.exp	2001/08/19 01:23:43	1.4
+++ mi0-var-display.exp	2001/09/28 19:03:42
@@ -591,6 +591,10 @@
     -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\"2\.*\"\}\},file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
 	pass "continue to incr_a"
     }
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
+	# Compiler debug info is wrong...
+	fail "continue to incr_a"
+    }
     timeout {
 	fail "continue to incr_a (timeout)"
     }


             reply	other threads:[~2001-09-28 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-28 12:15 Daniel Jacobowitz [this message]
     [not found] ` <3BB4DEBB.1020906@cygnus.com>
2001-09-28 13:38   ` Daniel Jacobowitz
2001-09-28 15:54   ` Daniel Jacobowitz
2001-09-28 16:29     ` Andrew Cagney
2001-10-01  7:28     ` Fernando Nasser
2001-10-01 13:30       ` Daniel Jacobowitz

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=20010928151616.A14106@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /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