This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[committed] Re: Testcase problem in chng-syms.exp
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 16 Mar 2007 16:33:30 +0100 (CET)
- Subject: [committed] Re: Testcase problem in chng-syms.exp
Hello,
> So you'd expect that the output would match the first pattern, right?
> However, it doesn't. This appears to be caused by the implementation
> of gdb_run_cmd, which ends in:
>
> send_gdb "run $args\n"
> # This doesn't work quite right yet.
> gdb_expect 60 {
> -re "The program .* has been started already.*y or n. $" {
> send_gdb "y\n"
> exp_continue
> }
> -re "Starting program: \[^\r\n\]*" {}
> }
>
> This means everything up to and including the line "Starting program: ..."
> is swallowed up by this gdb_expect, and the second one in chng-syms.exp
> does see the lines it is looking for any more.
I've now fixed this problem by adding -notransfer to the pattern.
Tested on s390-ibm-linux, s390x-ibm-linux, and spu-elf. Fixes
the failure on spu-elf. Committed to mainline.
Bye,
Ulrich
ChangeLog:
* lib/gdb.exp (gdb_run_cmd): Use -notransfer to make start-up
messages available to test cases (like chng-sym.exp).
Index: gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.78
diff -u -p -r1.78 gdb.exp
--- gdb/testsuite/lib/gdb.exp 23 Jan 2007 17:11:55 -0000 1.78
+++ gdb/testsuite/lib/gdb.exp 16 Mar 2007 14:33:17 -0000
@@ -283,7 +283,9 @@ proc gdb_run_cmd {args} {
send_gdb "y\n"
exp_continue
}
- -re "Starting program: \[^\r\n\]*" {}
+ # Use -notransfer here so that test cases (like chng-sym.exp)
+ # may test for additional start-up messages.
+ -notransfer -re "Starting program: \[^\r\n\]*" {}
}
}
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com