bpo-34007: Skip traceback tests if the Program Counter is not available. (GH-9018)

Sometimes some versions of the shared libraries that are part of the
traceback are compiled in optimised mode and the Program Counter (PC)
is not present, not allowing gdb to walk the frames back. When this
happens, the Python bindings of gdb raise an exception, making the
test impossible to succeed.
This commit is contained in:
Pablo Galindo 2018-08-31 23:04:47 +01:00 committed by GitHub
parent 95d630e221
commit f2ef51f8be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -206,6 +206,15 @@ class DebuggerTests(unittest.TestCase):
for line in errlines:
if not line:
continue
# bpo34007: Sometimes some versions of the shared libraries that
# are part of the traceback are compiled in optimised mode and the
# Program Counter (PC) is not present, not allowing gdb to walk the
# frames back. When this happens, the Python bindings of gdb raise
# an exception, making the test impossible to succeed.
if "PC not saved" in line:
raise unittest.SkipTest("gdb cannot walk the frame object"
" because the Program Counter is"
" not present")
if not line.startswith(ignore_patterns):
unexpected_errlines.append(line)