Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Fix testsuite interruption on cygwin in gdb.fortran/array-element.exp
@ 2007-10-09 14:40 Pierre Muller
  2007-10-09 15:05 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2007-10-09 14:40 UTC (permalink / raw)
  To: gdb-patches


 The testsuite does not go to completion on cygwin,
at least not on my computer.

I get a error:

Running ../../../src/gdb/testsuite/gdb.fortran/array-element.exp ...
ERROR: (DejaGnu) proc "additional" does not exist.

so nothing after gdb.fortran (in alphabetical order)
is tested... Which explains why I did not see
my pascal changes when testing them overnight.

 I had to dig quite a long time to find this out:
using 
make check RUNTESTFLAGS="--debug"
I was able to see in dbg.log that
there is a problem with lib/gdb.exp
due to a misplaced comment in gdb_run_cmd
Expect was looking for "The program .* has been started already.*y or n. $",
but after also for "#" "Use" "here"...
I have no idea if this is a problem of gdb_expect
or if comments are indeed not allowed inside this
function. It might be a cygwin specific issue,
but I have no ideas if this is the case.

  Anyhow, moving the comment outside of gdb_expect
solved this problem, see patch below.


 Is this OK to commit?

A simple way to test just this is to use
make check "RUNTESTFLAGS=--dir=gdb.fortran --debug"
and to inspect the file "dbg.log".
Could someone check if on other targets,
expect also considers the comment as a list of patterns?

Pierre Muller

testsuite/ChangeLog entry:

2007/10/09  Pierre Muller  <muller@ics.u-strasbg.fr>

	* lib/gdb.exp (gdb_run_cmd): Move comment outside
	of gdb_expect call, to avoid interruption.


$ cvs diff -up lib/gdb.exp
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.89
diff -u -p -r1.89 gdb.exp
--- lib/gdb.exp 9 Sep 2007 22:25:31 -0000       1.89
+++ lib/gdb.exp 9 Oct 2007 14:24:46 -0000
@@ -275,13 +275,13 @@ proc gdb_run_cmd {args} {
     }
     send_gdb "run $args\n"
 # This doesn't work quite right yet.
-    gdb_expect 60 {
+# Use -notransfer here so that test cases (like chng-sym.exp)
+# may test for additional start-up messages.
+   gdb_expect 60 {
        -re "The program .* has been started already.*y or n. $" {
            send_gdb "y\n"
            exp_continue
        }
-       # Use -notransfer here so that test cases (like chng-sym.exp)
-       # may test for additional start-up messages.
        -notransfer -re "Starting program: \[^\r\n\]*" {}
     }
 }



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

end of thread, other threads:[~2007-10-09 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-09 14:40 [RFC] Fix testsuite interruption on cygwin in gdb.fortran/array-element.exp Pierre Muller
2007-10-09 15:05 ` Daniel Jacobowitz
2007-10-09 15:49   ` Pierre Muller
2007-10-09 18:00   ` Joel Brobecker

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