aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace
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 /gdb/testsuite/gdb.trace
parenta1999d402252588a8087f705f21da889135a222c (diff)
downloadfsf-binutils-gdb-a2e0062d4ba06053c1f0b86d9abc88d1fc9424c7.zip
fsf-binutils-gdb-a2e0062d4ba06053c1f0b86d9abc88d1fc9424c7.tar.gz
fsf-binutils-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.
Diffstat (limited to 'gdb/testsuite/gdb.trace')
-rw-r--r--gdb/testsuite/gdb.trace/circ.exp34
1 files changed, 28 insertions, 6 deletions
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;
}