8000 gh-104736: Fix test_gdb tests on ppc64le with clang by vstinner · Pull Request #109360 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104736: Fix test_gdb tests on ppc64le with clang #109360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-104736: Fix test_gdb tests on ppc64le with clang
Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex:
Fedora 38). Search patterns in gdb "bt" command output to detect
when gdb fails to retrieve the traceback. For example, skip a test if
"Backtrace stopped: frame did not save the PC" is found.
  • Loading branch information
vstinner committed Sep 13, 2023
commit 4958e10dd1901e319281a1a5719432594e47b791
8 changes: 8 additions & 0 deletions Lib/test/test_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ def get_stack_trace(self, source=None, script=None,
# gh-91960: On Python built with "clang -Og", gdb gets
# "frame=<optimized out>" for _PyEval_EvalFrameDefault() parameter
'(unable to read python frame information)',
# gh-104736: On Python built with "clang -Og" on ppc64le,
# "py-bt" displays a truncated or not traceback, but "where"
# logs this error message:
'Backtrace stopped: frame did not save the PC',
# gh-104736: When "bt" command displays something like:
# "#1 0x0000000000000000 in ?? ()", the traceback is likely
# truncated or wrong.
' ?? ()',
):
if pattern in out:
raise unittest.SkipTest(f"{pattern!r} found in gdb output")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora
38). Search patterns in gdb "bt" command output to detect when gdb fails to
retrieve the traceback. For example, skip a test if ``Backtrace stopped: frame
did not save the PC`` is found. Patch by Victor Stinner.
0