[PATCH 12/18] testsuite: Range stepping and non-stop mode

Pedro Alves
2015-10-14T15:36:42Z

The range-stepping tests fail with "maint set target-non-stop on" mode
because exec_cmd_expect_vCont_count doesn't know that in non-stop
mode, vCont's reply is simply "OK".

gdb/testsuite/ChangeLog:
2015-10-14 Pedro Alves <palves@redhat.com>

* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
Handle non-stop mode vCont replies.
---
gdb/testsuite/lib/range-stepping-support.exp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp
index d6c0e85..78c1c7b 100644
--- a/gdb/testsuite/lib/range-stepping-support.exp
+++ b/gdb/testsuite/lib/range-stepping-support.exp
@@ -26,12 +26,15 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
set r_counter 0
set s_counter 0
set ret 1
+ # We either get a stop reply in all-stop mode, or an OK in
+ # non-stop mode.
+ set vcont_reply "(T\[\[:xdigit:\]\]\[\[:xdigit:\]\]|OK)"
gdb_test_multiple $cmd $test {
- -re "vCont;s\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" {
+ -re "vCont;s\[^\r\n\]*Packet received: $vcont_reply" {
incr s_counter
exp_continue
}
- -re "vCont;r\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" {
+ -re "vCont;r\[^\r\n\]*Packet received: $vcont_reply" {
incr r_counter
exp_continue
}
--
1.9.3