public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite/dap: rename dap_read_event to dap_wait_for_event_and_check
Date: Thu, 26 Jan 2023 20:23:08 +0000 (GMT)	[thread overview]
Message-ID: <20230126202308.49EDA3858407@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=59db4c934f9931d0c77a36cac1f9d6402ab7496d

commit 59db4c934f9931d0c77a36cac1f9d6402ab7496d
Author: Simon Marchi <simon.marchi@efficios.com>
Date:   Fri Jan 6 12:09:38 2023 -0500

    gdb/testsuite/dap: rename dap_read_event to dap_wait_for_event_and_check
    
    I think that name describes a bit better what the proc does, it is
    similar to "wait_for" in tuiterm.exp.
    
    Change-Id: Ie55aa011e6595dd1b5a874db13881ba572ace419

Diff:
---
 gdb/testsuite/gdb.dap/basic-dap.exp | 10 +++++-----
 gdb/testsuite/lib/dap-support.exp   |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/testsuite/gdb.dap/basic-dap.exp b/gdb/testsuite/gdb.dap/basic-dap.exp
index 68d0440f692..795702a5a8f 100644
--- a/gdb/testsuite/gdb.dap/basic-dap.exp
+++ b/gdb/testsuite/gdb.dap/basic-dap.exp
@@ -88,9 +88,9 @@ set bplist [dict get $response body breakpoints]
 set insn_pc [dict get [lindex $bplist 0] instructionReference]
 
 dap_check_request_and_response "start inferior" configurationDone
-dap_read_event "inferior started" thread "body reason" started
+dap_wait_for_event_and_check "inferior started" thread "body reason" started
 
-dap_read_event "stopped at function breakpoint" stopped \
+dap_wait_for_event_and_check "stopped at function breakpoint" stopped \
     "body reason" breakpoint \
     "body hitBreakpointIds" $fn_bpno
 
@@ -100,7 +100,7 @@ dap_match_values "global value in function" [lindex $obj 0] \
     "body result" 23
 
 dap_check_request_and_response step stepIn {o threadId [i 1]}
-dap_read_event "stopped after step" stopped "body reason" step
+dap_wait_for_event_and_check "stopped after step" stopped "body reason" step
 
 set obj [dap_check_request_and_response "evaluate global second time" \
 	     evaluate {o expression [s global_variable]}]
@@ -108,12 +108,12 @@ dap_match_values "global value after step" [lindex $obj 0] \
     "body result" 24
 
 dap_check_request_and_response "continue to address" continue
-dap_read_event "stopped at address breakpoint" stopped \
+dap_wait_for_event_and_check "stopped at address breakpoint" stopped \
     "body reason" breakpoint \
     "body hitBreakpointIds" $insn_bpno
 
 dap_check_request_and_response "continue to line" continue
-dap_read_event "stopped at line breakpoint" stopped \
+dap_wait_for_event_and_check "stopped at line breakpoint" stopped \
     "body reason" breakpoint \
     "body hitBreakpointIds" $line_bpno
 
diff --git a/gdb/testsuite/lib/dap-support.exp b/gdb/testsuite/lib/dap-support.exp
index ee55a4acc9c..179f675b4d8 100644
--- a/gdb/testsuite/lib/dap-support.exp
+++ b/gdb/testsuite/lib/dap-support.exp
@@ -284,7 +284,7 @@ proc dap_match_values {name d args} {
 
 # A helper for dap_read_event that reads events, looking for one
 # matching TYPE.
-proc _dap_read_event {type} {
+proc _dap_wait_for_event {type} {
     while 1 {
 	# We don't do any extra error checking here for the time
 	# being; we'll just get a timeout thrown instead.
@@ -303,12 +303,12 @@ proc _dap_read_event {type} {
 # between a field name (in "dict get" form) and its expected value.
 #
 # Returns the dict for the chosen event, or empty string on error.
-proc dap_read_event {name type args} {
+proc dap_wait_for_event_and_check {name type args} {
     if {$name == ""} {
 	set name $type
     }
 
-    set result [_dap_read_event $type]
+    set result [_dap_wait_for_event $type]
     eval dap_match_values [list $name $result] $args
 
     return $result

                 reply	other threads:[~2023-01-26 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230126202308.49EDA3858407@sourceware.org \
    --to=simark@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).