This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Fix racy gdb.mi/mi-nonstop.exp: interrupted (timeout)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 20 May 2009 22:38:37 +0200
- Subject: [patch] Fix racy gdb.mi/mi-nonstop.exp: interrupted (timeout)
Hi,
currently it could sometimes:
*stopped,reason="signal-received",signal-name="0",signal-meaning="Signal 0",frame={addr="0x0000003d69e07b0d",func="pthread_join",args=[{name="threadid",value="<value optimized out>"},{name="thread_return",value="<value optimized out>"}],file="pthread_join.c",fullname="/usr/src/debug/glibc-20090510T1842/nptl/pthread_join.c",line="89"},thread-id="1",stopped-threads=["1"]^M
~"Current language: auto; currently minimal\n"^M
FAIL: gdb.mi/mi-nonstop.exp: interrupted (timeout)
Attaching a quick fix, just I understand an MI grammar compliant parser would
be better for the testsuite.
Thanks,
Jan
gdb/testsuite/
2009-05-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.mi/mi-nonstop.exp (interrupted): Fix a race.
--- gdb/testsuite/gdb.mi/mi-nonstop.exp 2 Apr 2009 15:43:10 -0000 1.8
+++ gdb/testsuite/gdb.mi/mi-nonstop.exp 20 May 2009 20:36:03 -0000
@@ -87,7 +87,8 @@ mi_check_varobj_value I_W1 1 "check varo
send_gdb "-exec-interrupt --thread 1\n"
gdb_expect {
- -re "\\^done\r\n$mi_gdb_prompt\\*stopped\[^\r\n\]+\r\n$" {
+ -re "\\^done\r\n$mi_gdb_prompt\\*stopped\[^\r\n\]+\r\n" {
+ # ~"Current language: auto; currently minimal\n" may also follow.
pass "interrupted"
}
timeout {