Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_gdb fails on OSX #70180

Closed
BryceMiller mannequin opened this issue Jan 2, 2016 · 4 comments
Closed

test_gdb fails on OSX #70180

BryceMiller mannequin opened this issue Jan 2, 2016 · 4 comments
Labels
OS-mac tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@BryceMiller
Copy link
Mannequin

BryceMiller mannequin commented Jan 2, 2016

BPO 25992
Nosy @ronaldoussoren, @ned-deily
Superseder
  • bpo-21263: test_gdb failures on os x 10.9.2
  • Files
  • regrtest_test_gdb.log: verbose output for regrtest test_gdb failures
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-02-07.04:02:48.260>
    created_at = <Date 2016-01-02.05:50:06.321>
    labels = ['OS-mac', 'type-bug', 'tests']
    title = 'test_gdb fails on OSX'
    updated_at = <Date 2016-02-07.04:02:48.224>
    user = 'https://bugs.python.org/BryceMiller'

    bugs.python.org fields:

    activity = <Date 2016-02-07.04:02:48.224>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-02-07.04:02:48.260>
    closer = 'ned.deily'
    components = ['macOS', 'Tests']
    creation = <Date 2016-01-02.05:50:06.321>
    creator = 'Bryce Miller'
    dependencies = []
    files = ['41471']
    hgrepos = []
    issue_num = 25992
    keywords = []
    message_count = 4.0
    messages = ['257326', '257327', '257396', '259760']
    nosy_count = 3.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'Bryce Miller']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '21263'
    type = 'behavior'
    url = 'https://bugs.python.org/issue25992'
    versions = ['Python 2.7']

    @BryceMiller
    Copy link
    Mannequin Author

    BryceMiller mannequin commented Jan 2, 2016

    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 bpo-23137 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).

    @BryceMiller BryceMiller mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Jan 2, 2016
    @BryceMiller
    Copy link
    Mannequin Author

    BryceMiller mannequin commented Jan 2, 2016

    Github repo version was 4935c6c381b196334b97aac4e9e4e8fee35b0947

    @vadmium vadmium added the OS-mac label Jan 2, 2016
    @ned-deily
    Copy link
    Member

    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)?

    @terryjreedy terryjreedy changed the title test_gdb fails test_gdb fails on OSX Jan 8, 2016
    @ned-deily
    Copy link
    Member

    There is an open earlier issue about test_gdb failures on OS X with Homebrew. Closing this issue in favor of that one.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-mac tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants