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 creating non-listening sockets in tests on some platforms #5890

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jul 28, 2021

Fix the listen() invocation for the test server not to pass a backlog
value of zero. The value of zero means no backlog which effectively
means that the socket can not accept any connections. This does not
matter for the majority of platforms since the value is only advisory
and the platform tends to go with a bigger backlog anyway. However,
a few platforms (e.g. alpha or riscv Linux) do take the value literally,
and therefore the tests fail since they are unable to connect to
the server. Let Python use a 'default reasonable value' instead.

Fix the listen() invocation for the test server not to pass a backlog
value of zero.  The value of zero means no backlog which effectively
means that the socket can not accept any connections.  This does not
matter for the majority of platforms since the value is only advisory
and the platform tends to go with a bigger backlog anyway.  However,
a few platforms (e.g. alpha or riscv Linux) do take the value literally,
and therefore the tests fail since they are unable to connect to
the server.
@mgorny
Copy link
Contributor Author

mgorny commented Jul 28, 2021

I'm sorry about the failure, it didn't occur to me to test on Python 2.

@sigmavirus24 sigmavirus24 merged commit b227e3c into psf:master Jul 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants