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]

[RFC/WIP PATCH v2 05/14] watchthreads-reorder.exp: Don't assume there's no infrun output after the prompt


Like in the test of the previous patch, infrun debug output can still
appear after the prompt.  We should also turn off infrun debug output
after needing it, and before starting a new iteration.

v2:

 - new in v2.

gdb/testsuite/
2011-12-16  Pedro Alves  <pedro@codesourcery.com>

	* gdb.threads/watchthreads-reorder.exp: Don't assume there's no
	infrun output after the prompt.  Turn off infrun debug output at
	the end of each iteration.
---
 gdb/testsuite/gdb.threads/watchthreads-reorder.exp |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index 38e8b74..751658d 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -92,11 +92,21 @@ foreach reorder {0 1} {
 	     "Hardware read watchpoint \[0-9\]+: thread\[12\]_rwatch\r\n\r\nValue = 0\r\n0x\[0-9a-f\]+ in thread\[12\]_func .*" \
 	     "continue b"
 
-    # While the debug output itself is not checked in this testcase one bug was
-    # found in the DEBUG_INFRUN code path.
+    # While the debug output itself is not checked in this testcase
+    # one bug was found in the DEBUG_INFRUN code path.  Note we can't
+    # assume there's no infrun debug output after the prompt.
     gdb_test "set debug infrun 1"
 
-    gdb_continue_to_breakpoint "break-at-exit" ".*break-at-exit.*"
+    set test "continue to breakpoint: break-at-exit"
+    gdb_test_multiple "continue" $test {
+	-re "Breakpoint .* (at|in) .*break-at-exit.*\r\n$gdb_prompt " {
+	    pass $test
+	}
+	-re "$gdb_prompt " {
+	    fail $test
+	}
+    }
+    gdb_test "set debug infrun 0"
 
     set pf_prefix $prefix_test
 }


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