Skip to content

gh-132185: Avoid slow test_expanduser_pwd2 in test_posixpath#132186

Closed
itamaro wants to merge 1 commit into
python:mainfrom
itamaro:limit_test_expanduser_pwd2
Closed

gh-132185: Avoid slow test_expanduser_pwd2 in test_posixpath#132186
itamaro wants to merge 1 commit into
python:mainfrom
itamaro:limit_test_expanduser_pwd2

Conversation

@itamaro

@itamaro itamaro commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

On systems where pwd.getpwall() can return lots of entries, this test can end up being very slow, for no obvious benefit.

…ll()

On systems where `pwd.getpwall()` can return lots of entries, this test can end up being very slow, for no obvious benefit.
@itamaro itamaro added tests Tests in the Lib/test dir skip news 3.12 only security fixes 3.13 bugs and security fixes needs backport to 3.12 only security fixes 3.14 bugs and security fixes needs backport to 3.13 bugs and security fixes labels Apr 7, 2025

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just for the historic reasons: when we say "a very large number of entries" - what number do we mean exactly? 100? 100_000?

@itamaro

itamaro commented Apr 7, 2025

Copy link
Copy Markdown
Contributor Author

Just for the historic reasons: when we say "a very large number of entries" - what number do we mean exactly? 100? 100_000?

I can't disclose the exact number since it's from an internal environment, but I can say the "multi-minute run time" is for an output size that's O(100k)

@serhiy-storchaka

Copy link
Copy Markdown
Member

See also #132231.

@itamaro

itamaro commented Apr 7, 2025

Copy link
Copy Markdown
Contributor Author

See also #132231.

nice!
could we do the "choose only 100" regardless of whether the CPU resource is provided or not?
I understand that it's "acceptable" to do this if the CPU resource is provided, but I'm not sure what benefit we're getting from it, considering the "choose 100" thing should be exercising the functionality we want to test.

@ZeroIntensity ZeroIntensity removed 3.12 only security fixes 3.13 bugs and security fixes needs backport to 3.12 only security fixes 3.14 bugs and security fixes labels Apr 8, 2025
@itamaro
itamaro deleted the limit_test_expanduser_pwd2 branch April 12, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review needs backport to 3.13 bugs and security fixes skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants