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

Fix test_asyncore tests on Cygwin #73439

Closed
embray opened this issue Jan 12, 2017 · 3 comments
Closed

Fix test_asyncore tests on Cygwin #73439

embray opened this issue Jan 12, 2017 · 3 comments
Labels
tests Tests in the Lib/test dir

Comments

@embray
Copy link
Contributor

embray commented Jan 12, 2017

BPO 29253
Nosy @embray, @vadmium, @zware
Superseder
  • bpo-31882: Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin
  • Files
  • 0001-Fix-test_asyncore-tests-on-Cygwin-by-working-around-.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 = None
    closed_at = <Date 2018-07-19.10:32:21.661>
    created_at = <Date 2017-01-12.13:51:51.229>
    labels = ['tests']
    title = 'Fix test_asyncore tests on Cygwin'
    updated_at = <Date 2018-07-19.10:57:47.978>
    user = 'https://github.com/embray'

    bugs.python.org fields:

    activity = <Date 2018-07-19.10:57:47.978>
    actor = 'martin.panter'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-07-19.10:32:21.661>
    closer = 'erik.bray'
    components = ['Tests']
    creation = <Date 2017-01-12.13:51:51.229>
    creator = 'erik.bray'
    dependencies = []
    files = ['46272']
    hgrepos = []
    issue_num = 29253
    keywords = ['patch']
    message_count = 3.0
    messages = ['285326', '321928', '321946']
    nosy_count = 3.0
    nosy_names = ['erik.bray', 'martin.panter', 'zach.ware']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '31882'
    type = None
    url = 'https://bugs.python.org/issue29253'
    versions = []

    @embray
    Copy link
    Contributor Author

    embray commented Jan 12, 2017

    This patch works around a couple different problems with running the test_asyncore tests in Cygwin, both of which are due to bugs in Cygwin itself and not in Python. As such, I don't think Python should try to work around these issues in general, but I do think they're worth at least working around in the tests so that they can pass and/or skip.

    The first issue is more severe, as it actually causes the test run to hang indefinitely due to a bug in Cygwin that can cause connect() on a socket to block indefinitely. This occurs only in a situation where a "client" connects to a "server" that is not accept()-ing connections--a situation that occurs specifically in some of the asyncore tests where both the "client" and the "server" are in the same test process. This applies a known workaround to the tests only, allowing them to pass.

    The other bug simply causes a test failure--the bug is that getsockopt(SO_REUSEADDR) returns the wrong result after a setsockopt(SO_REUSEADDR) (the latter has the correct behavior; the value of the option just isn't reported back correctly after being set). In this case the relevant test is simply skipped on Cygwin.

    The patch is currently light on in-line documentation of the situation, but I can add that if it's otherwise approved.

    @embray embray added the tests Tests in the Lib/test dir label Jan 12, 2017
    @vadmium
    Copy link
    Member

    vadmium commented Jul 19, 2018

    Similar to bpo-31882

    @embray
    Copy link
    Contributor Author

    embray commented Jul 19, 2018

    Yes, it's a dupe. There was enough time after I later made the PR for this that I forgot I already opened an issue for it.

    @embray embray closed this as completed Jul 19, 2018
    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants