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] gdb.python/py-evthreads.exp: fix racy test (PR testsuite/12649)


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 {



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