This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch/obv] Skip gdb.trace/status-stop.exp if target doesn't support trace
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 12 Dec 2011 10:07:47 +0800
- Subject: [patch/obv] Skip gdb.trace/status-stop.exp if target doesn't support trace
I noticed that gdb.trace/status-stop.exp is run on target that doesn't
support tract at all. Like other test cases in gdb.trace,
gdb_target_supports_trace should be called first to check target
supports trace or not, which is missing in gdb.trace/status-stop.exp.
This patch is to check gdb_target_supports_trace first, like other
gdb.trace tests.
It is obvious. Committed.
--
Yao (éå)
gdb/testsuite/
* gdb.trace/status-stop.exp: Skip it if target doesn't support trace.
diff --git a/gdb/testsuite/gdb.trace/status-stop.exp b/gdb/testsuite/gdb.trace/status-stop.exp
index 6c92b75..e01ff32 100644
--- a/gdb/testsuite/gdb.trace/status-stop.exp
+++ b/gdb/testsuite/gdb.trace/status-stop.exp
@@ -27,6 +27,16 @@ if [prepare_for_testing $expfile $executable $srcfile \
return -1
}
+if ![runto_main] {
+ fail "Can't run to main to check for trace support"
+ return -1
+}
+
+if ![gdb_target_supports_trace] {
+ unsupported "target does not support trace"
+ return -1;
+}
+
# Verify that the sequence of commands "tstart tstop tstart" works well.
proc test_tstart_tstop_tstart { } {