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

catch also PermissionError in tests when spawning a non existent program #72848

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

catch also PermissionError in tests when spawning a non existent program #72848

xdegaye mannequin opened this issue Nov 10, 2016 · 3 comments
Assignees
Labels
3.7 tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Nov 10, 2016

BPO 28662
Nosy @xdegaye, @serhiy-storchaka
Files
  • catch_PermissionError.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-14.16:17:38.610>
    created_at = <Date 2016-11-10.23:17:51.912>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'catch also PermissionError in tests when spawning a non existent program'
    updated_at = <Date 2016-11-14.16:17:38.609>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2016-11-14.16:17:38.609>
    actor = 'xdegaye'
    assignee = 'xdegaye'
    closed = True
    closed_date = <Date 2016-11-14.16:17:38.610>
    closer = 'xdegaye'
    components = ['Tests']
    creation = <Date 2016-11-10.23:17:51.912>
    creator = 'xdegaye'
    dependencies = []
    files = ['45435']
    hgrepos = []
    issue_num = 28662
    keywords = ['patch']
    message_count = 3.0
    messages = ['280551', '280565', '280788']
    nosy_count = 3.0
    nosy_names = ['xdegaye', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28662'
    versions = ['Python 3.6', 'Python 3.7']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 10, 2016

    This is yet another idiosyncrasy of Android, the /sbin directory is in the $PATH of the adb shell used for running the tests on the emulator or on a device connected with usb to the build platform, and /sbin is readable and searchable only by root. For a plain user, the loop over exec_array[] in child_exec() at _posixsubprocess.c sets saved_errno to EACCES after failing to exec /sbin/some_non_existent_program.

    The patch fixes these failing tests on Android API 24: test_dtrace test_shutil test_subprocess.

    @xdegaye xdegaye mannequin added 3.7 tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Nov 10, 2016
    @serhiy-storchaka
    Copy link
    Member

    serhiy-storchaka commented Nov 11, 2016

    LGTM.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 14, 2016

    New changeset 1b2b2cb8f962 by Xavier de Gaye in branch '3.6':
    Issue bpo-28662: Catch PermissionError in tests when spawning a non existent program
    https://hg.python.org/cpython/rev/1b2b2cb8f962

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

    @xdegaye xdegaye mannequin closed this as completed Nov 14, 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 tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant