This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix recent gdb.mi testsuite "unknown output after running"


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  <jan.kratochvil@redhat.com>

	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]