Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fred Fish <fnf@specifix.com>
To: gdb-patches@sourceware.org
Cc: fnf@specifix.com
Subject: [RFA] Handle output after 'Program exited normally' consistently
Date: Thu, 11 May 2006 11:08:00 -0000	[thread overview]
Message-ID: <200605110709.11444.fnf@specifix.com> (raw)

There are 21 places in the current gdb testsuite where the testsuite checks
for 'Program exited normally' followed by a gdb prompt.  All of them, with 
the exception of a couple, use a test like:

    -re ".*Program exited normally.*$gdb_prompt $" {

Note that this swallows and accepts anything between the exit message
and the prompt.

Current the bang.exp test is failing when run in the mips-elf simulator 
because of some output between the message and the prompt:

    Program exited normally.
    Current language:  auto; currently asm
    (gdb)

which doesn't match the pattern checked for in bang.exp:

    -re ".*Program exited normally\.\r\n$gdb_prompt $" {

I believe that the bang.exp test should be changed to make it consistent
with the other tests.

If we care about testing for cruft between the exit message and the
gdb prompt, to specifically catch that case, then I think that should
have it's own dedicated testcase, which I'm happy to write and submit.

-Fred

2006-05-11  Fred Fish  <fnf@specifix.com>

	* gdb.base/bang.exp: Ignore unexpected output between the
	"program exited normally" and the gdb prompt, as many other
	tests do.

Index: gdb.base/bang.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/bang.exp,v
retrieving revision 1.3
diff -u -p -r1.3 bang.exp
--- gdb.base/bang.exp	7 Mar 2006 15:23:32 -0000	1.3
+++ gdb.base/bang.exp	11 May 2006 11:03:21 -0000
@@ -38,7 +38,7 @@ gdb_load ${binfile}
 
 gdb_run_cmd
 gdb_expect {
-    -re ".*Program exited normally\.\r\n$gdb_prompt $" {
+    -re ".*Program exited normally.*$gdb_prompt $" {
         pass "run program"
     }
     timeout {



             reply	other threads:[~2006-05-11 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-11 11:08 Fred Fish [this message]
2006-05-11 12:39 ` Daniel Jacobowitz
2006-05-11 14:39 ` [RFA] Handle output after 'Program exited normally' consistently (detect spurious output) Fred Fish
2006-05-15 15:57   ` Daniel Jacobowitz
2006-05-18  0:07     ` Fred Fish
2006-05-18  3:15       ` Daniel Jacobowitz
2006-05-11 17:34 ` [RFA] Handle output after 'Program exited normally' consistently PAUL GILLIAM
2006-05-12 20:33 ` Mark Kettenis

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=200605110709.11444.fnf@specifix.com \
    --to=fnf@specifix.com \
    --cc=gdb-patches@sourceware.org \
    /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