diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2018-08-31 22:04:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-31 22:04:47 (GMT) |
commit | f2ef51f8bec525b21e52988880c8a029642795ed (patch) | |
tree | e5203e81022246a5c07e7e63b6892ac02f842414 /Lib | |
parent | 95d630e2213fb0ffc197ec440efa3ae3dbb74f8d (diff) | |
download | cpython-f2ef51f8bec525b21e52988880c8a029642795ed.zip cpython-f2ef51f8bec525b21e52988880c8a029642795ed.tar.gz cpython-f2ef51f8bec525b21e52988880c8a029642795ed.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_gdb.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index 9e0eaea..c2ca57a 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -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) |