From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2899 invoked by alias); 10 Mar 2007 00:22:58 -0000 Received: (qmail 2891 invoked by uid 22791); 10 Mar 2007 00:22:57 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Mar 2007 00:22:51 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id l2A0MmAw098350 for ; Sat, 10 Mar 2007 00:22:48 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l2A0MmTv1933494 for ; Sat, 10 Mar 2007 01:22:48 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l2A0Mm1M030345 for ; Sat, 10 Mar 2007 01:22:48 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l2A0Mleb030342 for ; Sat, 10 Mar 2007 01:22:47 +0100 Message-Id: <200703100022.l2A0Mleb030342@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sat, 10 Mar 2007 01:22:47 +0100 Subject: Testcase problem in chng-syms.exp To: gdb-patches@sourceware.org Date: Sat, 10 Mar 2007 00:22:00 -0000 From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-03/txt/msg00115.txt.bz2 Hello, I'm seeing failures in chng-sym.exp which appear to be test case bugs. The output of GDB near the end of the test run is: Executing on host: spu-gcc /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.base/chng-syms.c -DVARIABLE=var2 -g -lm -o /home/uweig and/fsf/gdb-head-build/gdb/testsuite/gdb.base/chng-syms (timeout = 300) run ^M `/home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/chng-syms' has changed; re-reading symbols.^M Error in re-setting breakpoint 1:^M No symbol "var1" in current context.^M Starting program: /home/uweigand/fsf/gdb-head-build/gdb/testsuite/gdb.base/chng-syms ^M ^M Program exited normally.^M (gdb) FAIL: gdb.base/chng-syms.exp: running with invalidated bpt condition after executable changes Now, the corresponding test case code reads: gdb_run_cmd gdb_expect { -re "Error in re-setting .*No symbol .var1..*Program exited normally.*$gdb_prompt $" { pass "running with invalidated bpt condition after executable changes" } -re "Error in re-setting .*No symbol .var1..*Breakpoint .*,( 0x.* in)? exit .*$gdb_prompt $" { pass "running with invalidated bpt condition after executable changes" } -re "$gdb_prompt $" { fail "running with invalidated bpt condition after executable changes" } timeout { fail "(timeout) running with invalidated bpt condition after executable changes" } } 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. Did I overlook anything here? How can we best fix this? I'd appreciate any suggestions ... Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com