public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug dap/31354] New: [gdb/dap] FAIL: gdb.dap/pause.exp: python command failed
@ 2024-02-08  8:41 vries at gcc dot gnu.org
  2024-02-08 12:47 ` [Bug dap/31354] " vries at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-08  8:41 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31354
           Summary: [gdb/dap] FAIL: gdb.dap/pause.exp: python command
                    failed
           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: ---

I found a problem in the gdb.dap/pause.exp test-case.

It generates a python file, but fails to use it.  This fixes it:
...
diff --git a/gdb/testsuite/gdb.dap/pause.exp b/gdb/testsuite/gdb.dap/pause.exp
index e1e0d957fc6..c1b12fc373c 100644
--- a/gdb/testsuite/gdb.dap/pause.exp
+++ b/gdb/testsuite/gdb.dap/pause.exp
@@ -130,7 +130,7 @@ dap_read_response cancel $cancel_id
 # does not continue the inferior) can be canceled.
 #

-write_file py "while True:\n  pass"
+set gdbfile [write_file py "while True:\n  pass"]
 set cont_id [dap_send_request evaluate \
                 [format {o expression [s "source %s"] context [s repl]} \
                      $gdbfile]]
...

Then we run into:
...
Running /home/vries/gdb/src/gdb/testsuite/gdb.dap/pause.exp ...
FAIL: gdb.dap/pause.exp: python command failed
WARNING: While evaluating expression in gdb_assert: key "message" not known in
dictionary

                === gdb Summary ===

# of expected passes            18
# of unexpected failures        1
# of unresolved testcases       1
...

In more detail:
...
>>> {"seq": 12, "type": "request", "command": "evaluate", "arguments": {"expression": "source /home/vries/gdb/build/gdb/testsuite/outputs/gdb.dap/pause/pause.py", "context": "repl"}}
>>> {"seq": 13, "type": "request", "command": "cancel", "arguments": {"requestId": 12}}
Content-Length: 327^M
^M
{"request_seq": 12, "type": "response", "command": "evaluate", "body":
{"result": "Traceback (most recent call last):\n  File
\"/home/vries/gdb/build/gdb/testsuite/outputs/gdb.dap/pause/pause.py\", line 1,
in <module>\n    while True:\n          ^^^^\nKeyboardInterrupt\n",
"variablesReference": 0}, "success": true, "seq": 28}Content-Length: 88^M
^M
{"request_seq": 13, "type": "response", "command": "cancel", "success": true,
"seq": 29}FAIL: gdb.dap/pause.exp: python command failed
WARNING: While evaluating expression in gdb_assert: key "message" not known in
dictionary
UNRESOLVED: gdb.dap/pause.exp: python command canceled
...

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

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

end of thread, other threads:[~2024-02-27 16:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08  8:41 [Bug dap/31354] New: [gdb/dap] FAIL: gdb.dap/pause.exp: python command failed vries at gcc dot gnu.org
2024-02-08 12:47 ` [Bug dap/31354] " vries at gcc dot gnu.org
2024-02-08 16:54 ` tromey at sourceware dot org
2024-02-15 18:55 ` tromey at sourceware dot org
2024-02-16 18:38 ` tromey at sourceware dot org
2024-02-27 16:56 ` cvs-commit at gcc dot gnu.org
2024-02-27 16:56 ` cvs-commit at gcc dot gnu.org
2024-02-27 16:57 ` tromey at sourceware dot 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).