test_gdb fails for me on OSX Steps I did to duplicate: Checked out fresh '2.7' branch from https://github.com/python/cpython.git From the new cypthon dir ran: ./configure make make test ./Lib/test/regrtest.py -v test_gdb Attached the full verbose output. I am looking at Issue23137 and the output messages look different than mine, so I'm posting this as a separate issue. Perhaps it is duplicate. 34 tracebacks included in attachment, but below is a sample for reference: ====================================================================== FAIL: test_NULL_instance_dict (test.test_gdb.PrettyPrintTests) Ensure that a PyInstanceObject with with a NULL in_dict is handled ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py", line 521, in test_NULL_instance_dict exptype='Foo') File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py", line 459, in assertSane cmds_after_breakpoint=cmds_after_breakpoint) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py", line 239, in get_gdb_repr import_site=import_site) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py", line 224, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ['Unable to find Mach task por... != [] First list contains 4 additional elements. First extra element 0: Unable to find Mach task port for process-id 53220: (os/kern) failure (0x5).
As you may know, GNU gcc and gdb have not been included in the standard development tools shipped with Apple as part of Xcode and the Command Line Tools for a number of releases, in favor of llvm/clang and lldb. So test_gdb is typically automatically skipped on current OS X releases. That said, if you install gcc and gdb from a third-party and build a current Python with it, it would be good if test_gdb passed. However, the log file you attached hints that gdb may not be functional, at least with the Homebrew Python you appear to be using (built with Clang); note the'Unable to find Mach task port' message. Can you verify that the gdb you are using does or does not work with the Python in question, perhaps by trying some of the examples in the Developer's Guide (https://docs.python.org/devguide/gdb.html)?