Fix races in gdb.mi/mi-nsmoribund.exp.
authorMarek Polacek <mpolacek@sourceware.org>
Wed, 22 Jun 2011 15:38:00 +0000 (15:38 +0000)
committerMarek Polacek <mpolacek@sourceware.org>
Wed, 22 Jun 2011 15:38:00 +0000 (15:38 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-nsmoribund.exp

index 70ea0cd50e753bc9d52ebc2a543d7213f6490d50..fdc131c5547163277f7f463697ff21a43f2887bf 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 09fbe6fea7377674193f6bf94878587729359a7d..33b1ac3b4b52e3bf828417addaad4f4bb9f34ea7 100644 (file)
@@ -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"