public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/31425] New: [gdb/python, 3.12] FAIL: gdb.python/py-block.exp: check nonexistent variable
@ 2024-02-28  9:18 vries at gcc dot gnu.org
  2024-02-28  9:27 ` [Bug python/31425] " vries at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-28  9:18 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31425
           Summary: [gdb/python, 3.12] FAIL: gdb.python/py-block.exp:
                    check nonexistent variable
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

On aarch64-linux, with python 3.12.

Before commit a207f6b3a38 ("Rewrite "python" command exception handling"), we
had:
...
(gdb) python print (block['nonexistent'])^M
Traceback (most recent call last):^M
  File "<string>", line 1, in <module>^M
KeyError: 'nonexistent'^M
Error while executing Python code.^M
(gdb) PASS: gdb.python/py-block.exp: check nonexistent variable
...
but now we have:
...
(gdb) python print (block['nonexistent'])^M
Python Exception <class 'KeyError'>: 'nonexistent'^M
Error occurred in Python: 'nonexistent'^M
(gdb) FAIL: gdb.python/py-block.exp: check nonexistent variable
...

The change in the test-case is:
...
-gdb_test "python print (block\['nonexistent'\])" ".*KeyError: 'nonexistent'.*"
\
+gdb_test "python print (block\['nonexistent'\])" ".*KeyError.*: nonexistent.*"
\
          "check nonexistent variable"
...
which drops the single quotes around the nonexistent string.

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

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

end of thread, other threads:[~2024-03-09 15:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28  9:18 [Bug python/31425] New: [gdb/python, 3.12] FAIL: gdb.python/py-block.exp: check nonexistent variable vries at gcc dot gnu.org
2024-02-28  9:27 ` [Bug python/31425] " vries at gcc dot gnu.org
2024-02-28  9:39 ` vries at gcc dot gnu.org
2024-02-28  9:58 ` vries at gcc dot gnu.org
2024-02-28 10:05 ` vries at gcc dot gnu.org
2024-02-28 11:01 ` vries at gcc dot gnu.org
2024-02-28 15:00 ` tromey at sourceware dot org
2024-02-28 20:01 ` vries at gcc dot gnu.org
2024-03-04 16:05 ` vries at gcc dot gnu.org
2024-03-09 15:15 ` 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).