GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-118802: Fix ACL use in test for non-English Windows by zooba · Pull Request #118831 · python/cpython

Conversation

@zooba

@zooba zooba commented May 9, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: test_os fails on Windows #118802

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@zooba
pythongh-118802: Fix ACL use in test for non-English Windows
0e702ac
@zooba zooba added tests Tests in the Lib/test dir skip news needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels May 9, 2024
@bedevere-app bedevere-app Bot added the awaiting core review label May 9, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 9, 2024
test_os fails on Windows #118802
Closed
@zooba
zooba merged commit 82acc5f into python:main May 9, 2024
@miss-islington-app

miss-islington-app Bot commented May 9, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label May 9, 2024
@zooba
zooba deleted the gh-118802 branch May 9, 2024 12:59
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
@zooba @miss-islington
pythongh-118802: Fix ACL use in test for non-English Windows (pythonG…
6b2d0bd
…H-118831)

(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
@zooba @miss-islington
pythongh-118802: Fix ACL use in test for non-English Windows (pythonG…
d4c5645
…H-118831)

(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <[email protected]>
@bedevere-app

bedevere-app Bot commented May 9, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 9, 2024
@bedevere-app

bedevere-app Bot commented May 9, 2024

Copy link
Copy Markdown

GH-118838 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label May 9, 2024
zooba added a commit that referenced this pull request May 9, 2024
@miss-islington @zooba
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
a98e44a
(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <[email protected]>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 9, 2024
@zooba @SonicField
pythongh-118802: Fix ACL use in test for non-English Windows (pythonG…
b644ffa
…H-118831)
zooba added a commit that referenced this pull request May 9, 2024
@miss-islington @zooba
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
c0d257c
(cherry picked from commit 82acc5f)

Co-authored-by: Steve Dower <[email protected]>
eryksun
eryksun reviewed May 9, 2024
View reviewed changes
Comment thread Lib/test/test_os.py
# Give delete permission. We are the file owner, so we can do this
# even though we removed all permissions earlier.
subprocess.check_output([ICACLS, filename, "/grant", "Everyone:(D)"],
# Give delete permission to the owner (us)

@eryksun eryksun May 9, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

You're doing a lot more than you have to. Just /deny the right to synchronize on the file for users (*BU). CreateFileW() always requests SYNCHRONIZE access because it's in the API contract that File handles are waitable. OTOH, DeleteFileW() only needs DELETE access, so you can still delete the file without having to reset the security on it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@zooba zooba May 9, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It's only slightly more work, and this is a better emulation of the user report. It should be more robust if something else changes in the future (either failing hard, so we notice, or not failing at all). Being too targeted here could leave us open to the test passing being a false positive based on the environment, so I'd rather just go hard at it and be sure we're testing the right thing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JelleZijlstra JelleZijlstra mentioned this pull request May 28, 2024
backport a9a74da 3.13 #119642
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eryksun eryksun eryksun left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@zooba @eryksun
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.