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

cannot set_inheritable() for a file descriptor on Android #72932

Closed
xdegaye mannequin opened this issue Nov 19, 2016 · 3 comments
Closed

cannot set_inheritable() for a file descriptor on Android #72932

xdegaye mannequin opened this issue Nov 19, 2016 · 3 comments
Assignees
Labels
3.7 interpreter-core Interpreter core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Nov 19, 2016

BPO 28746
Nosy @xdegaye
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • set_inheritable.patch
  • 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 = 'https://github.com/xdegaye'
    closed_at = <Date 2016-11-19.16:35:49.474>
    created_at = <Date 2016-11-19.14:19:33.298>
    labels = ['interpreter-core', 'type-bug', '3.7']
    title = 'cannot set_inheritable() for a file descriptor on Android'
    updated_at = <Date 2017-03-31.16:36:10.597>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:10.597>
    actor = 'dstufft'
    assignee = 'xdegaye'
    closed = True
    closed_date = <Date 2016-11-19.16:35:49.474>
    closer = 'xdegaye'
    components = ['Interpreter Core']
    creation = <Date 2016-11-19.14:19:33.298>
    creator = 'xdegaye'
    dependencies = []
    files = ['45547']
    hgrepos = []
    issue_num = 28746
    keywords = ['patch']
    message_count = 3.0
    messages = ['281221', '281222', '281224']
    nosy_count = 2.0
    nosy_names = ['xdegaye', 'python-dev']
    pr_nums = ['552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28746'
    versions = ['Python 3.6', 'Python 3.7']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 19, 2016

    test_socket on Android fails with:
    FAIL: test_set_inheritable (test.test_socket.InheritanceTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socket.py", line 4936, in test_set_inheritable
        self.assertEqual(sock.get_inheritable(), True)
    AssertionError: False != True

    ======================================================================
    FAIL: test_set_inheritable_cloexec (test.test_socket.InheritanceTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_socket.py", line 4965, in test_set_inheritable_cloexec
        0)
    AssertionError: 1 != 0

    Setting a file descriptor with os.set_inheritable() also fails.
    Setting directly the file descriptor with fcntl.fcntl() succeeds.

    @xdegaye xdegaye mannequin added the 3.7 label Nov 19, 2016
    @xdegaye xdegaye mannequin self-assigned this Nov 19, 2016
    @xdegaye xdegaye mannequin added interpreter-core Interpreter core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Nov 19, 2016
    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 19, 2016

    It seems the code path run by Android is not tested by any of the buildbots.
    Patch attached.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 19, 2016

    New changeset 2fb2e3dc450e by Xavier de Gaye in branch '3.6':
    Issue bpo-28746: Fix the set_inheritable() file descriptor method on platforms
    https://hg.python.org/cpython/rev/2fb2e3dc450e

    New changeset 3248782c3176 by Xavier de Gaye in branch 'default':
    Issue bpo-28746: Merge 3.6
    https://hg.python.org/cpython/rev/3248782c3176

    @xdegaye xdegaye mannequin closed this as completed Nov 19, 2016
    @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
    3.7 interpreter-core Interpreter core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants