Skip to content

gh-86533: Make Path.mkdir parent_mode tests umask-independent#150040

Merged
gpshead merged 2 commits into
python:mainfrom
gpshead:gh-86533-fix-mkdir-test-umask
May 19, 2026
Merged

gh-86533: Make Path.mkdir parent_mode tests umask-independent#150040
gpshead merged 2 commits into
python:mainfrom
gpshead:gh-86533-fix-mkdir-test-umask

Conversation

@gpshead
Copy link
Copy Markdown
Member

@gpshead gpshead commented May 18, 2026

test_mkdir_with_parent_mode, test_mkdir_parent_mode_deep_hierarchy and
test_mkdir_parent_mode_same_as_mode assert exact directory mode bits but
did not pin the process umask.  On buildbots running with a restrictive
umask (e.g. 0o077) the 0o755 leaf was masked down to 0o700, failing the
assertions.  Wrap them in os_helper.temp_umask(0o022), matching the
other umask-aware mkdir tests in this file.
@gpshead gpshead merged commit 68ebc05 into python:main May 19, 2026
89 of 91 checks passed
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