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

wrong errno check #54103

Closed
pino mannequin opened this issue Sep 18, 2010 · 2 comments
Closed

wrong errno check #54103

pino mannequin opened this issue Sep 18, 2010 · 2 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pino
Copy link
Mannequin

pino mannequin commented Sep 18, 2010

BPO 9894
Nosy @pitrou
Files
  • errno_py3k.diff: errno fix, branch py3k
  • 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 2010-09-18.18:17:17.520>
    created_at = <Date 2010-09-18.16:44:30.817>
    labels = ['type-bug', 'tests']
    title = 'wrong errno check'
    updated_at = <Date 2010-09-18.18:17:17.517>
    user = 'https://bugs.python.org/pino'

    bugs.python.org fields:

    activity = <Date 2010-09-18.18:17:17.517>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-18.18:17:17.520>
    closer = 'pitrou'
    components = ['Tests']
    creation = <Date 2010-09-18.16:44:30.817>
    creator = 'pino'
    dependencies = []
    files = ['18920']
    hgrepos = []
    issue_num = 9894
    keywords = ['patch']
    message_count = 2.0
    messages = ['116813', '116819']
    nosy_count = 2.0
    nosy_names = ['pitrou', 'pino']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9894'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

    @pino
    Copy link
    Mannequin Author

    pino mannequin commented Sep 18, 2010

    In Lib/test/test_subprocess.py there's a check of an errno value done against a number, instead of using the proper E* constants, which is not portable (POSIX does not specify any actual value of the E* constants).
    This makes the test test_leaking_fds_on_error fail on OSes where the errno ENOENT has a value different than two (like on GNU/Hurd, for example).

    The attached patch was done in the py3k branch, but the issue appears in any other branch (including trunk). Could you please fix the issue also in the active Python branches?

    @pino pino mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Sep 18, 2010
    @pitrou
    Copy link
    Member

    pitrou commented Sep 18, 2010

    Fixed in r84878 (3.2), r84879 (2.7) and r84880 (3.1). Thank you!

    @pitrou pitrou closed this as completed Sep 18, 2010
    @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
    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