diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/circ.exp | 34 |
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; } |