public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
@ 2024-02-13  9:34 vries at gcc dot gnu.org
  2024-02-13  9:44 ` [Bug dap/31374] " cvs-commit at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-13  9:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

            Bug ID: 31374
           Summary: [gdb/dap] FAIL: gdb.dap/sources.exp: get source
                    success
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dap
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Created attachment 15359
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15359&action=edit
gdb.log

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
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dap/31374] [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
  2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
@ 2024-02-13  9:44 ` cvs-commit at gcc dot gnu.org
  2024-02-13  9:53 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-13  9:44 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

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

commit 4dad3c1e1c9e789addc0d196cef8e8ea22ddbeda
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Feb 13 10:44:25 2024 +0100

    [gdb/testsuite] Fix tcl error 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
    ERROR: tcl error sourcing gdb.dap/sources.exp.
    ERROR: key "body" not known in dictionary
    ...

    The FAIL has been filed as PR dap/31374.

    The ERROR happens because after the FAIL, dap_check_request_and_response
    returns "", and the test-case doesn't check for that.

    Fix this by checking for $obj != "" in the test-case.

    Tested on x86_64-linux.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dap/31374] [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
  2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
  2024-02-13  9:44 ` [Bug dap/31374] " cvs-commit at gcc dot gnu.org
@ 2024-02-13  9:53 ` vries at gcc dot gnu.org
  2024-02-13  9:58 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-13  9:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Passes with:
...
diff --git a/gdb/testsuite/gdb.dap/sources.exp
b/gdb/testsuite/gdb.dap/sources.exp
index f601190d6f5..eba1b9dcd50 100644
--- a/gdb/testsuite/gdb.dap/sources.exp
+++ b/gdb/testsuite/gdb.dap/sources.exp
@@ -46,6 +46,8 @@ if {$path == ""} {
 } else {
     pass "sources.c in loadedSources"

+    sleep 1
+    
     set obj [dap_check_request_and_response "get source" source \
                 [format {o source [o path [s %s]] \
                            sourceReference [i 0]} $path]]
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug dap/31374] [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
  2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
  2024-02-13  9:44 ` [Bug dap/31374] " cvs-commit at gcc dot gnu.org
  2024-02-13  9:53 ` vries at gcc dot gnu.org
@ 2024-02-13  9:58 ` vries at gcc dot gnu.org
  2024-02-13 10:09 ` [Bug testsuite/31374] " vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-13  9:58 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
This looks like a fix:
...
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]]
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/31374] [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
  2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-13  9:58 ` vries at gcc dot gnu.org
@ 2024-02-13 10:09 ` vries at gcc dot gnu.org
  2024-02-13 14:53 ` cvs-commit at gcc dot gnu.org
  2024-02-13 14:54 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-13 10:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|dap                         |testsuite

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2024-February/206554.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/31374] [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
  2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-02-13 10:09 ` [Bug testsuite/31374] " vries at gcc dot gnu.org
@ 2024-02-13 14:53 ` cvs-commit at gcc dot gnu.org
  2024-02-13 14:54 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-13 14:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

--- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/31374] [gdb/dap] FAIL: gdb.dap/sources.exp: get source success
  2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-02-13 14:53 ` cvs-commit at gcc dot gnu.org
@ 2024-02-13 14:54 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-13 14:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31374

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.1
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-13 14:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13  9:34 [Bug dap/31374] New: [gdb/dap] FAIL: gdb.dap/sources.exp: get source success vries at gcc dot gnu.org
2024-02-13  9:44 ` [Bug dap/31374] " cvs-commit at gcc dot gnu.org
2024-02-13  9:53 ` vries at gcc dot gnu.org
2024-02-13  9:58 ` vries at gcc dot gnu.org
2024-02-13 10:09 ` [Bug testsuite/31374] " vries at gcc dot gnu.org
2024-02-13 14:53 ` cvs-commit at gcc dot gnu.org
2024-02-13 14:54 ` vries at gcc dot gnu.org

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).