testsuite/gdb.trace: Fix expected message on continue.
authorMarcin Kościelnicki <koriakin@0x04.net>
Tue, 19 Jan 2016 11:30:34 +0000 (12:30 +0100)
committerMarcin Kościelnicki <koriakin@0x04.net>
Tue, 19 Jan 2016 12:04:58 +0000 (13:04 +0100)
This is fallout from f303dbd60d9c7984832446eeb9d4e4d89703c615.

The testcases themselves are single-threaded, but they load the IPA library,
which injects a thread in the inferior - making them multithreaded.
This results in printing the thread numbers in breakpoint messages.

gdb/testsuite/ChangeLog:

* gdb.trace/ftrace.exp: Fix expected message on continue.
* gdb.trace/pending.exp: Fix expected message on continue.
* gdb.trace/trace-break.exp: Fix expected message on continue.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/pending.exp
gdb/testsuite/gdb.trace/trace-break.exp

index 8b39bb3b062a91e1c7062e9623dfb13084fa807f..d4a8819b3647f7b5a25eaa415805bab919f64093 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-19  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * gdb.trace/ftrace.exp: Fix expected message on continue.
+       * gdb.trace/pending.exp: Fix expected message on continue.
+       * gdb.trace/trace-break.exp: Fix expected message on continue.
+
 2016-01-18  Simon Marchi  <simon.marchi@ericsson.com>
 
        * lib/gdb.exp (gdb_test): Remove unused global references.
index 33fc284d2f2e3350bb3e8634f70d9e26e5434894..15ad7e7ae8dc307164cd6a0e596b6f3818168ef3 100644 (file)
@@ -202,7 +202,8 @@ proc test_ftrace_condition { condexp var list } \
        "collect $var" "^$"
 
     gdb_test_no_output "tstart" ""
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" ""
+    gdb_test "continue" \
+       "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" ""
     gdb_test_no_output "tstop" ""
 
     set i 0
index 0393ebdcdb1558bd5be01a713a98e706e910771c..98e17f7a41f233caf7dbc9a56c20ba5bdcead272 100644 (file)
@@ -154,7 +154,7 @@ proc pending_tracepoint_works { trace_type } {
 
        }
 
-       gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*" \
+       gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*" \
            "continue to marker"
 
        gdb_test "tstop" "\[\r\n\]+" "stop trace experiment"
@@ -204,7 +204,7 @@ proc pending_tracepoint_resolved_during_trace { trace_type } \
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
        "continue to marker 1"
 
     set test "continue to marker 2"
@@ -264,7 +264,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*${srcfile}.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*${srcfile}.*" \
        "continue to marker 1"
 
     # Set a pending tracepoint during a tracing experiment.
@@ -294,7 +294,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \
                fail $test
            }
        }
-       -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
+       -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
            pass $test
        }
     }
@@ -341,7 +341,7 @@ proc pending_tracepoint_disconnect_during_trace { trace_type } \
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
        "continue to marker"
 
     set test "disconnect with pending tracepoint"
@@ -389,9 +389,9 @@ proc pending_tracepoint_disconnect_after_resolved { trace_type } \
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
        "continue to marker 1"
-    gdb_test "continue" "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
        "continue to marker 2"
 
     # There should be no pending tracepoint, so no warning should be emitted.
@@ -450,7 +450,7 @@ proc pending_tracepoint_with_action_resolved { trace_type } \
 
     gdb_test_no_output "tstart" "start trace experiment"
 
-    gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \
+    gdb_test "continue" "Continuing.\r\n\r\n(Thread .* hit )?Breakpoint.*marker.*at.*pending.c.*" \
        "continue to marker 1"
 
     set test "continue to marker 2"
@@ -467,7 +467,7 @@ proc pending_tracepoint_with_action_resolved { trace_type } \
                fail $test
             }
        }
-       -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
+       -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" {
            pass "continue to marker 2"
        }
 
index af6f4254007bed64d4e621a0ad3e46ac350dff04..a264822afd761eb4e575c56af9e0a4398bd7608d 100644 (file)
@@ -61,9 +61,11 @@ proc break_trace_same_addr_1 { trace_type option } \
 
     gdb_test_no_output "tstart"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to set_point"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to set_point"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to end"
     gdb_test_no_output "tstop"
 
     gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
@@ -98,7 +100,8 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
        "${trace_type2} set_point (2)"
 
     gdb_test_no_output "tstart"
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to end"
 
     gdb_test_no_output "tstop"
 
@@ -132,10 +135,12 @@ proc break_trace_same_addr_3 { trace_type option } \
 
     gdb_test_no_output "tstart"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to marker"
     gdb_test "delete break 4"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to end"
     gdb_test_no_output "tstop"
 
     gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
@@ -166,14 +171,17 @@ proc break_trace_same_addr_4 { trace_type option } \
     gdb_test "break set_point" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to marker"
     # Delete tracepoint set on set_point.
     gdb_test "delete trace 5"
 
     gdb_test "tstart" "No tracepoints defined, not starting trace.*"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to set_point"
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to set_point"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to end"
     gdb_test "tstop" "Trace is not running.*"
 
     gdb_test "tfind" "Target failed to find requested trace frame\\..*"
@@ -216,7 +224,8 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
 
     gdb_test_no_output "tstart"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to marker"
 
     if [string equal $trace3_at_first_loc "1"] {
        gdb_test "${trace3} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
@@ -229,7 +238,8 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
     gdb_trace_setactions "set action for tracepoint 3" "" \
        "collect \$$fpreg" "^$"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to end"
     gdb_test_no_output "tstop"
 
     gdb_test "tfind tracepoint 4" "Found trace frame \[0-9\], tracepoint .*" \
@@ -275,7 +285,8 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
     gdb_test "break marker" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "break end" "Breakpoint \[0-9\] at $hex: file.*"
 
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to marker"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to marker"
 
     gdb_test "${trace1} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
        "${trace1} set_point 1"
@@ -290,7 +301,8 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
     gdb_test_no_output "$enable2 5"
 
     gdb_test_no_output "tstart"
-    gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
+    gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
+       "continue to end"
     gdb_test_no_output "tstop"