Skip to content

[3.11] gh-95243: Mitigate the race condition in testSockName (GH-96173) #96256

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

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 25, 2022

find_unused_port() has an inherent race condition, but we can't use
bind_port() as that uses .getsockname() which this test is exercising.

Try binding to unused ports a few times before failing.

Signed-off-by: Ross Burton [email protected]
(cherry picked from commit df11012)

Co-authored-by: Ross Burton [email protected]

…-96173)

find_unused_port() has an inherent race condition, but we can't use
bind_port() as that uses .getsockname() which this test is exercising.

Try binding to unused ports a few times before failing.

Signed-off-by: Ross Burton <[email protected]>
(cherry picked from commit df11012)

Co-authored-by: Ross Burton <[email protected]>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 915ee9e into python:3.11 Aug 25, 2022
@miss-islington miss-islington deleted the backport-df11012-3.11 branch August 25, 2022 02:03
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

Successfully merging this pull request may close these issues.

4 participants