Skip to content

gh-80198: Improve test_pwd and test_grp#150380

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:test_pwd-test_grp
May 25, 2026
Merged

gh-80198: Improve test_pwd and test_grp#150380
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:test_pwd-test_grp

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented May 25, 2026

Fix tests for non-existing names and ids when getpwall()/getgrall() don't return all users/groups.

Add tests for out-of-range uids, gid=-1, integer float ids, bytes names, null-terminated names, names with surrogates, empty names, excessive arguments.

Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.

Add tests for out-of-range uids, gid=-1, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 25, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 25, 2026
@serhiy-storchaka
Copy link
Copy Markdown
Member Author

The new test for gid=-1 fails on macOS (and maybe on other platforms?). Remove it for now.

@serhiy-storchaka serhiy-storchaka merged commit 46e8f7a into python:main May 25, 2026
49 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka serhiy-storchaka deleted the test_pwd-test_grp branch May 25, 2026 13:17
@miss-islington-app
Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5 3.15

@miss-islington-app
Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5 3.14

@miss-islington-app
Copy link
Copy Markdown

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

cherry_picker 46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5 3.13

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 25, 2026

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 25, 2026
@serhiy-storchaka serhiy-storchaka removed needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 25, 2026
@serhiy-storchaka serhiy-storchaka removed their assignment May 25, 2026
serhiy-storchaka added a commit that referenced this pull request May 25, 2026
Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.

Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit 46e8f7a)
serhiy-storchaka added a commit that referenced this pull request May 25, 2026
GH-150422)

Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.


Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit 4bdff2c)
(cherry picked from commit 46e8f7a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request May 25, 2026
GH-150423)

Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.

Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit 4bdff2c)
(cherry picked from commit 46e8f7a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant