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

gh-124402: Require cpu resource in test_free_threading #124438

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 24, 2024

Require the 'cpu' test resource on slow test_free_threading tests.

Require the 'cpu' test resource on slow test_free_threading tests.
@vstinner
Copy link
Member Author

vstinner commented Sep 24, 2024

@terryjreedy: With this change, test_free_threading takes 5 seconds instead of 5 to 9 minutes.

cc @colesbury @serhiy-storchaka

I used --junit-xml option to measure how much time takes each test and skipped tests taking longer than 1 second on Windows.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@vstinner vstinner merged commit 38a5beb into python:main Sep 24, 2024
38 checks passed
@vstinner vstinner deleted the test_free_threading branch September 24, 2024 14:33
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 38a5beb12a64461a06b84fab285944ecb66de04c 3.13

vstinner added a commit to vstinner/cpython that referenced this pull request Sep 24, 2024
…124438)

Require the 'cpu' test resource on slow test_free_threading tests.

(cherry picked from commit 38a5beb)
@bedevere-app
Copy link

bedevere-app bot commented Sep 24, 2024

GH-124439 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 24, 2024
Yhg1s pushed a commit that referenced this pull request Sep 24, 2024
… (#124439)

gh-124402: Require cpu resource in test_free_threading (#124438)

Require the 'cpu' test resource on slow test_free_threading tests.

(cherry picked from commit 38a5beb)
@colesbury
Copy link
Contributor

@vstinner - Please slow down with these changes. Marking these tests as cpu makes them much less useful because they do not run on PRs in GitHub CI.

As I wrote on the original issue, we should be reducing the number of iterations and the number of threads so that they can run quickly.

@vstinner
Copy link
Member Author

I replied on the issue: #124402 (comment)

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants