aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-02-15 17:20:07 +0000
committerPedro Alves <palves@redhat.com>2012-02-15 17:20:07 +0000
commita2e0062d4ba06053c1f0b86d9abc88d1fc9424c7 (patch)
treea01456be70faa8fa4404a797f494b9465cb7a5c4
parenta1999d402252588a8087f705f21da889135a222c (diff)
downloadgdb-a2e0062d4ba06053c1f0b86d9abc88d1fc9424c7.zip
gdb-a2e0062d4ba06053c1f0b86d9abc88d1fc9424c7.tar.gz
gdb-a2e0062d4ba06053c1f0b86d9abc88d1fc9424c7.tar.bz2
2012-02-15 Pedro Alves <palves@redhat.com>
* gdb.trace/circ.exp (trace_buffer_normal): Rewrite using gdb_test_multiple, and call unsupported instead of fail, if the remote side does not support the request.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.trace/circ.exp34
2 files changed, 34 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5816b0d..449b80e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2012-02-15 Pedro Alves <palves@redhat.com>
+ * gdb.trace/circ.exp (trace_buffer_normal): Rewrite using
+ gdb_test_multiple, and call unsupported instead of fail, if the
+ remote side does not support the request.
+
+2012-02-15 Pedro Alves <palves@redhat.com>
+
* gdb.server/ext-attach.exp: Make sure gdb is disconnected.
* gdb.server/ext-run.exp: Make sure gdb is disconnected.
* gdb.server/file-transfer.exp: Make sure gdb is disconnected.
diff --git a/gdb/testsuite/gdb.trace/circ.exp b/gdb/testsuite/gdb.trace/circ.exp
index 61a5235..4344beb 100644
--- a/gdb/testsuite/gdb.trace/circ.exp
+++ b/gdb/testsuite/gdb.trace/circ.exp
@@ -88,16 +88,38 @@ proc setup_tracepoints { } {
# return 0 for success, 1 for failure
proc trace_buffer_normal { } {
- if [gdb_test "maint packet QTBuffer:size:ffffffff" \
- "received: .OK." ""] then {
- pass "This test cannot be run on this target"
+ global gdb_prompt
+
+ set ok 0
+ set test "maint packet QTBuffer:size:ffffffff"
+ gdb_test_multiple $test $test {
+ -re "received: .OK.\r\n$gdb_prompt $" {
+ set ok 1
+ pass $test
+ }
+ -re "\r\n$gdb_prompt $" {
+ }
+ }
+ if { !$ok } {
+ unsupported $test
return 1;
}
- if [gdb_test "maint packet QTBuffer:circular:0" \
- "received: .OK." ""] then {
- pass "This test cannot be run on this target"
+
+ set ok 0
+ set test "maint packet QTBuffer:circular:0"
+ gdb_test_multiple $test $test {
+ -re "received: .OK.\r\n$gdb_prompt $" {
+ set ok 1
+ pass $test
+ }
+ -re "\r\n$gdb_prompt $" {
+ }
+ }
+ if { !$ok } {
+ unsupported $test
return 1;
}
+
return 0;
}