summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-08-31 18:43:24 -0400
committerGitHub <noreply@github.com>2018-08-31 18:43:24 -0400
commit5d594f3106aff6cea00234c88051427ae511cdd8 (patch)
tree8a7ff26c85f2fe0bdc6668ee480b0105391ff135
parentd8b103b8b3ef9644805341216963a64098642435 (diff)
downloadcpython-git-5d594f3106aff6cea00234c88051427ae511cdd8.tar.gz
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. (cherry picked from commit f2ef51f8bec525b21e52988880c8a029642795ed) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
-rw-r--r--Lib/test/test_gdb.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index d49769e44e..c45fd45735 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -215,6 +215,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)