GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.10] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) by ambv · Pull Request #108406 · python/cpython

Conversation

@ambv

@ambv ambv commented Aug 24, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • In preauth tests of test_ssl, explicitly break reference cycles invoving SingleConnectionTestServerThread to make sure that the thread is deleted. Otherwise, the test marks the environment as altered because the threading module sees a "dangling thread" (SingleConnectionTestServerThread). This test leak was introduced by the test added for the fix of issue CVE-2023-40217: Bypass TLS handshake on closed sockets #108310.
  • Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds timeout.
  • SingleConnectionTestServerThread.run() catchs TimeoutError
  • Fix a race condition (missing synchronization) in test_preauth_data_to_tls_client(): the server now waits until the client connect() completed in call_after_accept().
  • test_https_client_non_tls_response_ignored() calls server.join() explicitly.
  • Replace "localhost" with server.listener.getsockname()[0]. (cherry picked from commit 592bacb)
  • Issue: test_ssl fails with "env changed" on ARM64 Windows buildbot: thread doesn't catch TimeoutError #108342

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner @ambv
[3.10] pythongh-108342: Make ssl TestPreHandshakeClose more reliable (p…
a3169d0
…ythonGH-108370)

* In preauth tests of test_ssl, explicitly break reference cycles
  invoving SingleConnectionTestServerThread to make sure that the
  thread is deleted. Otherwise, the test marks the environment as
  altered because the threading module sees a "dangling thread"
  (SingleConnectionTestServerThread). This test leak was introduced
  by the test added for the fix of issue pythongh-108310.
* Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds
  timeout.
* SingleConnectionTestServerThread.run() catchs TimeoutError
* Fix a race condition (missing synchronization) in
  test_preauth_data_to_tls_client(): the server now waits until the
  client connect() completed in call_after_accept().
* test_https_client_non_tls_response_ignored() calls server.join()
  explicitly.
* Replace "localhost" with server.listener.getsockname()[0].
(cherry picked from commit 592bacb)

Co-authored-by: Victor Stinner <[email protected]>
@ambv
ambv requested a review from tiran as a code owner August 24, 2023 08:58
@bedevere-bot bedevere-bot mentioned this pull request Aug 24, 2023
test_ssl fails with "env changed" on ARM64 Windows buildbot: thread doesn't catch TimeoutError #108342
Closed
2 tasks done
@bedevere-bot bedevere-bot added the skip news label Aug 24, 2023
@bedevere-bot bedevere-bot mentioned this pull request Aug 24, 2023
gh-108342: Make ssl TestPreHandshakeClose more reliable #108370
Merged
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting core review labels Aug 24, 2023
@ambv
ambv merged commit e96bddf into python:3.10 Aug 24, 2023
@ambv
ambv deleted the backport-592bacb-3.10 branch August 24, 2023 10:09
@bedevere-bot bedevere-bot removed the awaiting core review label Aug 24, 2023
@ambv
ambv restored the backport-592bacb-3.10 branch August 24, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tiran tiran Awaiting requested review from tiran

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ambv @bedevere-bot @vstinner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.