Visitar URL original
bpo-43921: Fix test_ssl.test_pha_required_nocert() by vstinner · Pull Request #26489 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20210603141238/https://github.com/python/cpython/pull/26489
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

bpo-43921: Fix test_ssl.test_pha_required_nocert() #26489

Merged
merged 1 commit into from Jun 2, 2021

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jun 2, 2021 •

Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).

https://bugs.python.org/issue43921

Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).
@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

Without this change, python -m test test_ssl -u all -v -F -j5 -m test_pha_required_nocert fails in less than 2 minutes.

With this change, the command didn't fail, I ran it for like 30 minutes.

@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

cc @tiran @pablogsal: I plan to merge this fix tomorrow, test_ssl random failures are super annoying, and I'm sure that this change fix the issue (I ran a functional test, see my previous comment).

@tiran
Copy link
Member

@tiran tiran commented Jun 2, 2021

LGTM, although it's more of a patch than a proper fix. The test connection should not fail with an EOF error. There is some foul play. It's good enough for me.

@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

The test connection should not fail with an EOF error.

I don't have the bandwidth to investigate that. I'm just an employee who like to see a green CI. The EOF check was already there before my change :-p

@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

If someone wants to enhance the test, I would suggest to check for TLS alerts, rather than checking how the client socket fails or how it's closed.

@vstinner vstinner merged commit 320eaa7 into python:main Jun 2, 2021
13 checks passed
13 checks passed
@github-actions
Docs
Details
@github-actions
Check for source changes
Details
@github-actions
Check if generated files are up to date
Details
@github-actions
Windows (x86)
Details
@github-actions
Windows (x64)
Details
@github-actions
macOS
Details
@github-actions
Ubuntu
Details
@github-actions
Ubuntu SSL tests with OpenSSL (1.1.1k)
Details
@github-actions
Ubuntu SSL tests with OpenSSL (3.0.0-alpha17)
Details
Azure Pipelines PR #20210602.18 succeeded
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@bedevere-bot
bedevere/issue-number Issue number 43921 found
Details
@bedevere-bot
bedevere/news News entry found in Misc/NEWS.d
@vstinner vstinner deleted the vstinner:pha_required_nocert branch Jun 2, 2021
@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

Come on little bot, you can do it! I believe in you!

@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

@miss-islington: knock knock knock

@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 2, 2021

The backport PR is not created automatically :-( python/miss-islington#462

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 2, 2021

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 2, 2021

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 2, 2021

GH-26494 is a backport of this pull request to the 3.10 branch.

miss-islington added a commit to miss-islington/cpython that referenced this pull request Jun 2, 2021
Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).
(cherry picked from commit 320eaa7)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington added a commit that referenced this pull request Jun 2, 2021
Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).
(cherry picked from commit 320eaa7)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants