This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/5] Cleanup tsv.exp
This patch remove some code in tsv.exp which is not related to testing
TSV, for example, there are three tracepoints created in it but only
one is used. Don't have to create the rest of two tracepoints at all.
gdb/testsuite:
2013-03-07 Yao Qi <yao@codesourcery.com>
* gdb.trace/tsv.exp: Remove code unrelated to testing TSV.
Replace some "gdb_test" with "gdb_test_no_output".
---
gdb/testsuite/gdb.trace/tsv.exp | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp
index 47d66ad..bab0a10 100644
--- a/gdb/testsuite/gdb.trace/tsv.exp
+++ b/gdb/testsuite/gdb.trace/tsv.exp
@@ -110,22 +110,10 @@ if { ![gdb_target_supports_trace] } then {
return 1;
}
-# define relative source line numbers:
-# all subsequent line numbers are relative to this first one (baseline)
-
-set baseline [gdb_find_recursion_test_baseline $srcfile];
-if { $baseline == -1 } then {
- fail "Could not find gdb_recursion_test function"
- return;
-}
-
-set testline1 [expr $baseline + 7]
-
gdb_delete_tracepoints
set trcpt1 [gdb_gettpnum gdb_c_test];
-set trcpt2 [gdb_gettpnum gdb_asm_test];
-set trcpt3 [gdb_gettpnum $testline1];
-if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then {
+
+if { $trcpt1 <= 0 } then {
fail "setting tracepoints"
return;
}
@@ -138,7 +126,7 @@ gdb_trace_setactions "collect tsv for first tracepoint" \
"$trcpt1" \
"collect \$tvar5 += 1" "^$"
-gdb_test "tstart" ".*" ""
+gdb_test_no_output "tstart" ""
gdb_test "print \$tvar5" " = 15" \
"Print a trace state variable at start of run"
@@ -152,7 +140,7 @@ gdb_test "continue" \
gdb_test "print \$tvar5" " = 16" \
"Print a trace state variable during run"
-gdb_test "tstop" ".*" ""
+gdb_test_no_output "tstop" ""
gdb_test "print \$tvar5" " = 16" \
"Print a trace state variable after run"
--
1.7.7.6