Skip to content

Commit a5602f6

Browse files
committed
pythongh-110166: Skip test_gdb on "Unable to locate python frame"
Skip stack trace tests using get_stack_trace() if "Unable to locate python frame" is logged by gdb.
1 parent 1465386 commit a5602f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_gdb/util.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ def get_stack_trace(self, source=None, script=None,
269269
# "#1 0x0000000000000000 in ?? ()", the traceback is likely
270270
# truncated or wrong.
271271
' ?? ()',
272+
273+
# gh-110166: py-bt-full logs "Unable to locate python frame" when
274+
# it fails to locate a Python frame. In such case, "bt" may
275+
# display "#1 0x0000000000000000 in ?? ()".
276+
"Unable to locate python frame",
272277
):
273278
if pattern in out:
274279
raise unittest.SkipTest(f"{pattern!r} found in gdb output")

0 commit comments

Comments
 (0)