aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/pending.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.trace/pending.exp')
-rw-r--r--gdb/testsuite/gdb.trace/pending.exp89
1 files changed, 24 insertions, 65 deletions
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index 9dc8706..7a9d01d 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -60,16 +60,12 @@ if ![gdb_target_supports_trace] {
# Verify pending tracepoint is resolved to running to main.
-proc pending_tracepoint_resolved { trace_type } {
+proc pending_tracepoint_resolved { trace_type } { with_test_prefix " $trace_type resolved:" {
global srcdir
global subdir
global binfile
global srcfile
global lib_sl1
- global pf_prefix
-
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "resolved:"
# Start with a fresh gdb.
gdb_exit
@@ -101,22 +97,16 @@ proc pending_tracepoint_resolved { trace_type } {
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc.*" \
"single tracepoint info"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Verify pending tracepoint is resolved and works as expected.
-proc pending_tracepoint_works { trace_type } {
+proc pending_tracepoint_works { trace_type } { with_test_prefix " $trace_type works:" {
global executable
global srcfile
global lib_sl1
- global pf_prefix
global gdb_prompt
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "works:"
-
# Restart with a fresh gdb.
clean_restart $executable
@@ -150,7 +140,6 @@ proc pending_tracepoint_works { trace_type } {
}
-re ".*$gdb_prompt $" {
kfail "gdb/13392" "continue to marker"
- set pf_prefix $old_pf_prefix
return
}
}
@@ -161,27 +150,22 @@ proc pending_tracepoint_works { trace_type } {
gdb_test "tfind" "Found trace frame 1, tracepoint 1.*" "tfind test frame 1"
gdb_test "tfind" "Found trace frame 2, tracepoint 1.*" "tfind test frame 2"
gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Verify pending tracepoint is resolved during trace.
-proc pending_tracepoint_resolved_during_trace { trace_type } {
+proc pending_tracepoint_resolved_during_trace { trace_type } \
+{ with_test_prefix " $trace_type resolved_in_trace:" \
+{
global executable
global srcfile
global gdb_prompt
global lib_sl1
- global pf_prefix
-
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "resolved_in_trace:"
# Start with a fresh gdb.
clean_restart $executable
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -211,7 +195,6 @@ proc pending_tracepoint_resolved_during_trace { trace_type } {
}
-re ".*$gdb_prompt $" {
kfail "gdb/13392" "continue to marker 2"
- set pf_prefix $old_pf_prefix
return
}
}
@@ -226,28 +209,23 @@ proc pending_tracepoint_resolved_during_trace { trace_type } {
gdb_test "tfind start" "#0 .*" "tfind test frame 0"
gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Verify pending tracepoint is resolved and installed during trace.
-proc pending_tracepoint_installed_during_trace { trace_type } {
+proc pending_tracepoint_installed_during_trace { trace_type } \
+{ with_test_prefix " $trace_type installed_in_trace:" \
+{
global executable
global srcfile
global lib_sl1
global gdb_prompt
- global pf_prefix
global hex
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "installed_in_trace:"
-
# Start with a fresh gdb.
clean_restart $executable
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -281,7 +259,6 @@ proc pending_tracepoint_installed_during_trace { trace_type } {
}
-re ".*$gdb_prompt $" {
kfail "gdb/13392" "continue to marker 2"
- set pf_prefix $old_pf_prefix
return
}
}
@@ -296,28 +273,23 @@ proc pending_tracepoint_installed_during_trace { trace_type } {
gdb_test "tfind start" "#0 $hex in pendfunc2 .*" "tfind test frame 0"
gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Verify pending tracepoint will no longer work if we disconnect during tracing.
-proc pending_tracepoint_disconnect_during_trace { trace_type } {
+proc pending_tracepoint_disconnect_during_trace { trace_type } \
+{ with_test_prefix " $trace_type disconn:" \
+{
global executable
global srcfile
global lib_sl1
- global pf_prefix
global gdb_prompt
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "disconn:"
-
# Start with a fresh gdb.
clean_restart $executable
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -349,28 +321,23 @@ proc pending_tracepoint_disconnect_during_trace { trace_type } {
}
}
}
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Verify disconnect after pending tracepoint has been resolved.
-proc pending_tracepoint_disconnect_after_resolved { trace_type } {
+proc pending_tracepoint_disconnect_after_resolved { trace_type } \
+{ with_test_prefix " $trace_type disconn_resolved:" \
+{
global executable
global srcfile
global lib_sl1
global gdb_prompt
- global pf_prefix
-
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "disconn_resolved:"
# Start with a fresh gdb.
clean_restart $executable
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -407,27 +374,22 @@ proc pending_tracepoint_disconnect_after_resolved { trace_type } {
pass "$test"
}
}
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Verify action works properly in resolved tracepoint.
-proc pending_tracepoint_with_action_resolved { trace_type } {
+proc pending_tracepoint_with_action_resolved { trace_type } \
+{ with_test_prefix " $trace_type action_resolved:" \
+{
global executable
global srcfile
global lib_sl1
global gdb_prompt
- global pf_prefix
-
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$trace_type" "action_resolved:"
# Start with a fresh gdb.
clean_restart $executable
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -467,7 +429,6 @@ proc pending_tracepoint_with_action_resolved { trace_type } {
}
-re ".*$gdb_prompt $" {
kfail "gdb/13392" "continue to marker 2"
- set pf_prefix $old_pf_prefix
return
}
}
@@ -483,9 +444,7 @@ proc pending_tracepoint_with_action_resolved { trace_type } {
gdb_test "tfind start" "#0 .*" "tfind test frame 0"
gdb_test "tdump" "Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${pcreg} = .*"
gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
-
- set pf_prefix $old_pf_prefix
-}
+}}
pending_tracepoint_resolved "trace"