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

System.IO.FileSystem.AccessControl tests leave behind files ACL'ed to be difficult to delete #44766

Closed
MattGal opened this issue Nov 16, 2020 · 2 comments · Fixed by #47074
Closed
Assignees
Labels
area-System.IO Cost:S Work that requires one engineer up to 1 week Priority:3 Work that is nice to have test-bug Problem in test source code (most likely)
Milestone

Comments

@MattGal
Copy link
Member

MattGal commented Nov 16, 2020

https://github.com/dotnet/runtime/blob/master/src/libraries/System.IO.FileSystem.AccessControl/tests/FileSystemAclExtensionsTests.cs#L475

In checking out some helix machines, I found various leftovers from these tests, some of which result in creating files and directories which are specific deny-acl'ed for all users.

Ideally any changes done like this could be cleaned up via a finally() block, since if a real user runs these tests locally their personal temp folder could be clogged up with the same.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.IO untriaged New issue has not been triaged by the area owner labels Nov 16, 2020
@ViktorHofer
Copy link
Member

cc @carlossanlop @jozkee

@danmoseley
Copy link
Member

This could potentially be done in TempDirectory itself -- when it fails to do the delete it attempts to fix the ACL's recursively

catch { /* Ignore exceptions on disposal paths */ }

That way it would help all tests that use it.

@carlossanlop carlossanlop removed the untriaged New issue has not been triaged by the area owner label Nov 18, 2020
@carlossanlop carlossanlop added this to the 6.0.0 milestone Nov 18, 2020
@jeffhandley jeffhandley added Priority:3 Work that is nice to have test-bug Problem in test source code (most likely) labels Jan 14, 2021
@carlossanlop carlossanlop added the Cost:S Work that requires one engineer up to 1 week label Jan 14, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 16, 2021
@jeffhandley jeffhandley self-assigned this Jan 20, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO Cost:S Work that requires one engineer up to 1 week Priority:3 Work that is nice to have test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants