Skip to content

gh-162364: Speed up test_signal StressTest.test_stress_delivery_simultaneous - #162366

Merged
cmaloney merged 2 commits into
python:mainfrom
cmaloney:gh-162364-test-signal
Nov 21, 2026
Merged

cmaloney merged 2 commits into
python:mainfrom
cmaloney:gh-162364-test-signal

Conversation

@cmaloney

@cmaloney cmaloney commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Reuse the short-sleep polling loop from test_stress_delivery_dependent. The 10 ms minimum sleep of sleeping_retry() dominated the test's runtime, especially under macOS background QoS where timer coalescing stretches each sleep.

…_simultaneous

Reuse the short-sleep polling loop from test_stress_delivery_dependent.
The 10 ms minimum sleep of sleeping_retry() dominated the test's
runtime, especially under macOS background QoS where timer coalescing
stretches each sleep.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmaloney cmaloney added skip news needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 21, 2026
@cmaloney

Copy link
Copy Markdown
Contributor Author

!buildbot ARM64 MacOS M1 Refleaks NoGIL PR

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @cmaloney for commit 6d8e1e4 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F162366%2Fmerge

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 Refleaks NoGIL PR

The builders matched are:

  • ARM64 MacOS M1 Refleaks NoGIL PR

@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Nov 21, 2026
@cmaloney cmaloney removed the type-feature A feature request or enhancement label Nov 21, 2026
The wait avoids coalescing of pending signals; timer coalescing on
macOS is what made the old 10 ms sleep so slow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Nov 21, 2026
@cmaloney

Copy link
Copy Markdown
Contributor Author

From the bot: test.test_io.test_signals passed (2 min 46 sec) on this branch, test_signal: 25 min 13 sec from the last main build so significantly faster.

@cmaloney
cmaloney merged commit 3fd6401 into python:main Nov 21, 2026
55 of 57 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @cmaloney for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@cmaloney
cmaloney deleted the gh-162364-test-signal branch November 21, 2026 20:39
@bedevere-app

bedevere-app Bot commented Nov 21, 2026

Copy link
Copy Markdown

GH-162401 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 21, 2026
@bedevere-app

bedevere-app Bot commented Nov 21, 2026

Copy link
Copy Markdown

GH-162402 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 21, 2026
cmaloney added a commit that referenced this pull request Nov 21, 2026
…y_simultaneous (GH-162366) (#162401)

gh-162364: Speed up test_signal StressTest.test_stress_delivery_simultaneous (GH-162366)

Reuse the short-sleep polling loop from test_stress_delivery_dependent.
The 10 ms minimum sleep of sleeping_retry() dominated the test's
runtime, especially under macOS background QoS where timer coalescing
stretches each sleep.
(cherry picked from commit 3fd6401)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
cmaloney added a commit that referenced this pull request Nov 21, 2026
…y_simultaneous (GH-162366) (#162402)

gh-162364: Speed up test_signal StressTest.test_stress_delivery_simultaneous (GH-162366)

Reuse the short-sleep polling loop from test_stress_delivery_dependent.
The 10 ms minimum sleep of sleeping_retry() dominated the test's
runtime, especially under macOS background QoS where timer coalescing
stretches each sleep.
(cherry picked from commit 3fd6401)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants