From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5091 invoked by alias); 9 Oct 2007 14:37:02 -0000 Received: (qmail 5073 invoked by uid 22791); 9 Oct 2007 14:37:01 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Oct 2007 14:36:53 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 89813187023 for ; Tue, 9 Oct 2007 16:41:33 +0200 (CEST) From: "Pierre Muller" To: Subject: [RFC] Fix testsuite interruption on cygwin in gdb.fortran/array-element.exp Date: Tue, 09 Oct 2007 14:40:00 -0000 Message-ID: <003001c80a81$db94f350$92bed9f0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00199.txt.bz2 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 * 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\]*" {} } }