This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Handle output after 'Program exited normally' consistently
- From: Fred Fish <fnf at specifix dot com>
- To: gdb-patches at sourceware dot org
- Cc: fnf at specifix dot com
- Date: Thu, 11 May 2006 07:09:11 -0400
- Subject: [RFA] Handle output after 'Program exited normally' consistently
- Reply-to: fnf at specifix dot com
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 {