aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMarek Polacek <mpolacek@sourceware.org>2011-06-22 15:38:00 +0000
committerMarek Polacek <mpolacek@sourceware.org>2011-06-22 15:38:00 +0000
commitd0b1d6240c1cdc8d4052b5e2177f45313f7b5949 (patch)
tree1fd9c6cd974e241aaad0ac3e0b48c9a9e815b167 /gdb/testsuite
parent79aa92c12491bf202580f274011546a6926d6615 (diff)
downloadgdb-d0b1d6240c1cdc8d4052b5e2177f45313f7b5949.zip
gdb-d0b1d6240c1cdc8d4052b5e2177f45313f7b5949.tar.gz
gdb-d0b1d6240c1cdc8d4052b5e2177f45313f7b5949.tar.bz2
Fix races in gdb.mi/mi-nsmoribund.exp.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.mi/mi-nsmoribund.exp11
2 files changed, 10 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 70ea0cd..fdc131c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2011-06-20 Marek Polacek <mpolacek@redhat.com>
+ * gdb.mi/mi-nsmoribund.exp: Replace gdb_test_multiple with
+ mi_gdb_test.
+
+2011-06-20 Marek Polacek <mpolacek@redhat.com>
+
* gdb.mi/mi-return.exp: Replace gdb_test_multiple with mi_gdb_test.
2011-06-14 Yao Qi <yao@codesourcery.com>
diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
index 09fbe6f..33b1ac3 100644
--- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
+++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
@@ -82,15 +82,14 @@ mi_create_breakpoint "-p 5 $srcfile:$bkpt_line" 3 keep thread_function .* .* .*
# Resume all threads. Only thread 5 should report a stop.
set running_re ""
-for {set i $nthreads} {$i > 0} {incr i -1} {
+for {set i $nthreads} {$i > 1} {incr i -1} {
set running_re "$running_re\\*running,thread-id=\"$decimal\"\r\n"
}
+# Don't append \r\n after last line.
+set running_re "$running_re\\*running,thread-id=\"$decimal\""
-gdb_test_multiple "-exec-continue --all" "resume all, thread specific breakpoint" {
- -re ".*$running_re$mi_gdb_prompt" {
- pass "resume all, thread specific breakpoint"
- }
-}
+mi_gdb_test "-exec-continue --all" "\[^\n\]*\r\n$running_re" \
+ "resume all, thread specific breakpoint"
mi_expect_stop "breakpoint-hit" "thread_function" "\[^\n\]*" "$srcfile" \
"\[0-9\]*" {"" "disp=\"keep\""} "hit thread specific breakpoint"