This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Current target does not support trace: PASS->UNSUPPORTED
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 15 Feb 2012 18:03:05 +0000
- Subject: [PATCH] Current target does not support trace: PASS->UNSUPPORTED
Speaking of UNSUPPORTED, I'm applying this patch.
These generous PASSes have bothered me before -- I've ran some of the
tracepoint tests against the native target by mistake, say all PASSes,
and didn't realize I wasn't even testing what I wanted to test. Avoid
this by issuing the proper UNSUPPORTED instead.
gdb/testsuite/
2012-02-15 Pedro Alves <palves@redhat.com>
* gdb.trace/backtrace.exp: Issue UNSUPPORTED instead of PASS when
the target doesn't support tracepoints.
* gdb.trace/circ.exp: Ditto.
* gdb.trace/collection.exp: Ditto.
* gdb.trace/packetlen.exp: Ditto.
* gdb.trace/passc-dyn.exp: Ditto.
* gdb.trace/report.exp: Ditto.
* gdb.trace/tfind.exp: Ditto.
* gdb.trace/tspeed.exp: Ditto.
* gdb.trace/tsv.exp: Ditto.
* gdb.trace/unavailable.exp: Ditto.
* gdb.trace/while-dyn.exp: Ditto.
---
gdb/testsuite/gdb.trace/backtrace.exp | 4 +---
gdb/testsuite/gdb.trace/circ.exp | 5 +----
gdb/testsuite/gdb.trace/collection.exp | 4 +---
gdb/testsuite/gdb.trace/packetlen.exp | 4 +---
gdb/testsuite/gdb.trace/passc-dyn.exp | 4 +---
gdb/testsuite/gdb.trace/report.exp | 4 +---
gdb/testsuite/gdb.trace/tfind.exp | 4 +---
gdb/testsuite/gdb.trace/tspeed.exp | 4 +---
gdb/testsuite/gdb.trace/tsv.exp | 2 +-
gdb/testsuite/gdb.trace/unavailable.exp | 4 +---
gdb/testsuite/gdb.trace/while-dyn.exp | 4 +---
11 files changed, 11 insertions(+), 32 deletions(-)
diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp
index f683442..7d97893 100644
--- a/gdb/testsuite/gdb.trace/backtrace.exp
+++ b/gdb/testsuite/gdb.trace/backtrace.exp
@@ -35,10 +35,8 @@ gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/circ.exp b/gdb/testsuite/gdb.trace/circ.exp
index 61a5235..808ae81 100644
--- a/gdb/testsuite/gdb.trace/circ.exp
+++ b/gdb/testsuite/gdb.trace/circ.exp
@@ -103,11 +103,8 @@ proc trace_buffer_normal { } {
# return 0 for success, 1 for failure
proc gdb_trace_circular_tests { } {
-
- # We generously give ourselves one "pass" if we successfully
- # detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp
index 9398248..9beb9af 100644
--- a/gdb/testsuite/gdb.trace/collection.exp
+++ b/gdb/testsuite/gdb.trace/collection.exp
@@ -779,10 +779,8 @@ proc gdb_trace_collection_test {} {
clean_restart $executable
runto_main
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/packetlen.exp b/gdb/testsuite/gdb.trace/packetlen.exp
index ccc4384..4ce13e6 100644
--- a/gdb/testsuite/gdb.trace/packetlen.exp
+++ b/gdb/testsuite/gdb.trace/packetlen.exp
@@ -35,10 +35,8 @@ gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp
index 1ec120e..718a4da 100644
--- a/gdb/testsuite/gdb.trace/passc-dyn.exp
+++ b/gdb/testsuite/gdb.trace/passc-dyn.exp
@@ -34,10 +34,8 @@ gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
index 2f2962a..7c08a41 100644
--- a/gdb/testsuite/gdb.trace/report.exp
+++ b/gdb/testsuite/gdb.trace/report.exp
@@ -35,10 +35,8 @@ gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp
index ec0ba11..d025f39 100644
--- a/gdb/testsuite/gdb.trace/tfind.exp
+++ b/gdb/testsuite/gdb.trace/tfind.exp
@@ -36,10 +36,8 @@ gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp
index 0becf18..b6e6eca 100644
--- a/gdb/testsuite/gdb.trace/tspeed.exp
+++ b/gdb/testsuite/gdb.trace/tspeed.exp
@@ -129,10 +129,8 @@ proc gdb_trace_collection_test {} {
clean_restart $executable
runto_main
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp
index 373bc42..b8af4d6 100644
--- a/gdb/testsuite/gdb.trace/tsv.exp
+++ b/gdb/testsuite/gdb.trace/tsv.exp
@@ -92,7 +92,7 @@ gdb_reinitialize_dir $srcdir/$subdir
# The rest of the testing needs actual tracing to work.
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp
index 5d82d4c..87af860 100644
--- a/gdb/testsuite/gdb.trace/unavailable.exp
+++ b/gdb/testsuite/gdb.trace/unavailable.exp
@@ -586,10 +586,8 @@ proc gdb_trace_collection_test {} {
clean_restart $executable
runto_main
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}
diff --git a/gdb/testsuite/gdb.trace/while-dyn.exp b/gdb/testsuite/gdb.trace/while-dyn.exp
index f71f3a4..3e8aa2d 100644
--- a/gdb/testsuite/gdb.trace/while-dyn.exp
+++ b/gdb/testsuite/gdb.trace/while-dyn.exp
@@ -36,10 +36,8 @@ gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-# We generously give ourselves one "pass" if we successfully
-# detect that this test cannot be run on this target!
if { ![gdb_target_supports_trace] } then {
- pass "Current target does not support trace"
+ unsupported "Current target does not support trace"
return 1;
}