This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/testsuite] Fix race in mi-break.exp
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Vladimir Prus <vladimir at codesourcery dot com>
- Date: Tue, 16 Feb 2010 16:08:45 -0500
- Subject: [commit/testsuite] Fix race in mi-break.exp
A race condition I noticed ages ago but never got around to fixing.
You can't use mi_gdb_test with -exec-continue, because mi_gdb_test
only expects one "(gdb)". If it gets two, it may stop after the first
one.
--
Daniel Jacobowitz
CodeSourcery
2010-02-16 Daniel Jacobowitz <dan@codesourcery.com>
gdb/testsuite/
* gdb.mi/mi-break.exp (test_breakpoint_commands): Use
mi_send_resuming_command to send -exec-continue.
diff -urp gdb-merged-orig/gdb/testsuite/gdb.mi/mi-break.exp gdb-merged/gdb/testsuite/gdb.mi/mi-break.exp
--- gdb-merged-orig/gdb/testsuite/gdb.mi/mi-break.exp 2010-02-10 14:53:19.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.mi/mi-break.exp 2010-02-15 16:39:27.000000000 -0800
@@ -232,11 +232,10 @@ proc test_breakpoint_commands {} {
"\\^done" \
"breakpoint commands: set commands"
- mi_gdb_test "-exec-continue" \
+ mi_send_resuming_command "exec-continue" "test hitting breakpoint with commands"
+ mi_gdb_test "" \
".*\\\$1 = 0.*\\\$10 = 9.*\\*running.*\\*stopped,reason=\"exited-normally\".*" \
- "test hitting breakpoint with commands"
-
-
+ "test hitting breakpoint with commands"
}
test_tbreak_creation_and_listing