[PATCH] gdb.python/py-evthreads.exp: fix racy test (PR testsuite/12649)
Marek Polacek
mpolacek@redhat.com
Tue Jun 28 14:19:00 GMT 2011
This test fails with read1() because after sending "continue&"
the regexp with ".*" at the end didn't eat all that it ought to.
This causes trouble later on. Thusly fixed by adding the "\r\n$gdb_prompt".
Tested with both read{,1}. OK?
2011-06-28 Marek Polacek <mpolacek@redhat.com>
* gdb.python/py-evthreads.exp: Fix race by adding an anchor to match
the whole output.
--- gdb/gdb/testsuite/gdb.python/py-evthreads.exp.mp 2011-06-22 15:14:07.869452151 +0200
+++ gdb/gdb/testsuite/gdb.python/py-evthreads.exp 2011-06-28 16:10:53.157450752 +0200
@@ -86,7 +86,7 @@ gdb_expect {
send_gdb "continue&\n"
gdb_expect {
-re ".*event type: continue.*
-.*thread num: 1.*" {
+.*thread num: 1.*\r\n$gdb_prompt" {
pass "continue thread 1"
}
timeout {
More information about the Gdb-patches
mailing list