From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23787 invoked by alias); 20 May 2009 18:32:27 -0000 Received: (qmail 23776 invoked by uid 22791); 20 May 2009 18:32:26 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_32,J_CHICKENPOX_41,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 May 2009 18:32:17 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4KIWGIW004189 for ; Wed, 20 May 2009 14:32:16 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4KIWF6g011487 for ; Wed, 20 May 2009 14:32:15 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4KIWCOZ015684 for ; Wed, 20 May 2009 14:32:14 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n4KIWBff013157 for ; Wed, 20 May 2009 20:32:11 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n4KIWARp013146 for gdb-patches@sourceware.org; Wed, 20 May 2009 20:32:10 +0200 Date: Wed, 20 May 2009 18:32:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix recent gdb.mi testsuite "unknown output after running" Message-ID: <20090520183209.GA12914@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-IsSubscribed: yes 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: 2009-05/txt/msg00428.txt.bz2 Hi, recently getting on Fedora 11 (=Rawhide) x86_64: FAIL: gdb.mi/mi-nsintrall.exp: mi runto main (unknown output after running) ERROR: mi-nsintrall.exp tests suppressed FAIL: gdb.mi/mi-async.exp: start: stop (unknown output after running) FAIL: gdb.mi/mi-async.exp: restart: stop (unknown output after running) FAIL: gdb.mi/mi-nsmoribund.exp: mi runto main (unknown output after running) ERROR: mi-nsmoribund.exp tests suppressed FAIL: gdb.mi/mi-nonstop.exp: mi runto main (unknown output after running) ERROR: mi-nonstop.exp tests suppressed FAIL: gdb.mi/mi-nonstop-exit.exp: mi runto main (unknown output after running) ERROR: mi-nonstop-exit.exp tests suppressed but it is more a bug in the testsuite as GDB output looks valid (below). Attaching a quick fix, just I understand an MI grammar compliant parser would be better for the testsuite. Regards, Jan ^running^M *running,thread-id="all"^M (gdb) ^M mi_expect_stop: expecting: \*stopped,reason="breakpoint-hit",disp="del",bkptno="[0-9]+",frame={addr="0x[0-9A-Fa-f]+",func="main",args=\[\],file="[^ ]*.*basics.c",fullname="(/[^\n]*/|\\\\[^\\]+\\[^\n]+\\|\\[^\\][^\n]*\\|[a-zA-Z]:[^\n]*\\).*basics.c",line="66"},thread-id="[0-9]+",stopped-threads=[^ ]*^M (=thread-selected,id="[0-9+]"^M )? =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0"^M (gdb) ^M got =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0"^M (gdb) ^M FAIL: gdb.mi/mi-async.exp: start: stop (unknown output after running) next^M =library-loaded,id="/lib64/libm.so.6",target-name="/lib64/libm.so.6",host-name="/lib64/libm.so.6",symbols-loaded="0"^M =library-loaded,id="/lib64/libc.so.6",target-name="/lib64/libc.so.6",host-name="/lib64/libc.so.6",symbols-loaded="0"^M *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x00000000004005a4",func="main",args=[],file="../.././gdb/testsuite/gdb.mi/basics.c",fullname="/home/jkratoch/redhat/gdb-cvs-clean/gdb/testsuite/gdb.mi/basics.c",line="66"},thread-id="1",stopped-threads="all"^M &"next\n"^M ^running^M gdb/testsuite/ 2009-05-20 Jan Kratochvil * lib/mi-support.exp (mi_expect_stop): Fix parsing unexpected prompt in async mode. --- gdb/testsuite/lib/mi-support.exp 2 Apr 2009 15:43:10 -0000 1.83 +++ gdb/testsuite/lib/mi-support.exp 20 May 2009 18:26:44 -0000 @@ -1044,6 +1044,11 @@ proc mi_expect_stop { reason func args f return -1 } -re ".*\r\n$mi_gdb_prompt$" { + if {$async} { + # There can appear arbitrary prompts in the async mode, the + # expected response will come later. + exp_continue + } verbose -log "got $expect_out(buffer)" fail "$test (unknown output after running)" return -1