]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] bpo-34007: Skip traceback tests if the Program Counter is not available. (GH...
authorPablo Galindo <Pablogsal@gmail.com>
Fri, 7 Sep 2018 22:10:28 +0000 (23:10 +0100)
committerGitHub <noreply@github.com>
Fri, 7 Sep 2018 22:10:28 +0000 (23:10 +0100)
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>
Lib/test/test_gdb.py

index b7554d698c9d6c549716e4871e7d5005f3b0a0ce..bedec1fb493a2a81067557759da07d61a413449f 100644 (file)
@@ -212,6 +212,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)