From a2e0062d4ba06053c1f0b86d9abc88d1fc9424c7 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 15 Feb 2012 17:20:07 +0000 Subject: [PATCH] 2012-02-15 Pedro Alves * 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. --- gdb/testsuite/ChangeLog | 6 ++++++ 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 5816b0d33eb..449b80e778b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-02-15 Pedro Alves + + * 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 * gdb.server/ext-attach.exp: Make sure gdb is disconnected. diff --git a/gdb/testsuite/gdb.trace/circ.exp b/gdb/testsuite/gdb.trace/circ.exp index 61a523560b4..4344bebc086 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; } -- 2.30.2