public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix fail in gdb.dap/sources.exp Date: Tue, 13 Feb 2024 14:53:18 +0000 (GMT) [thread overview] Message-ID: <20240213145318.830493858C50@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a16034bf6417dc2259fef43fd5bcc2dd1dac562f commit a16034bf6417dc2259fef43fd5bcc2dd1dac562f Author: Tom de Vries <tdevries@suse.de> Date: Tue Feb 13 15:53:28 2024 +0100 [gdb/testsuite] Fix fail in gdb.dap/sources.exp With test-case gdb.dap/sources.exp, I run into: ... {"request_seq": 4, "type": "response", "command": "source", \ "success": false, "message": "notStopped", \ "seq": 11}FAIL: gdb.dap/sources.exp: get source success ... The fail happens because the request races with the stopping at main as requested by: ... if {[dap_launch $testfile stop_at_main 1] == ""} { ... Fix this by waiting for the stop, in the same way that is done in other test-cases that use stop_at_main. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> PR testsuite/31374 https://sourceware.org/bugzilla/show_bug.cgi?id=31374 Diff: --- gdb/testsuite/gdb.dap/sources.exp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/testsuite/gdb.dap/sources.exp b/gdb/testsuite/gdb.dap/sources.exp index f601190d6f5..9b56337e5a8 100644 --- a/gdb/testsuite/gdb.dap/sources.exp +++ b/gdb/testsuite/gdb.dap/sources.exp @@ -46,6 +46,9 @@ if {$path == ""} { } else { pass "sources.c in loadedSources" + dap_wait_for_event_and_check "stopped at function breakpoint" stopped \ + "body reason" breakpoint + set obj [dap_check_request_and_response "get source" source \ [format {o source [o path [s %s]] \ sourceReference [i 0]} $path]]
reply other threads:[~2024-02-13 14:53 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=20240213145318.830493858C50@sourceware.org \ --to=vries@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: linkBe 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).