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

[iOS/tvOS] System.IO.Compression.Tests.ZipFile_Unix.UnixCreateSetsPermissionsInExternalAttributes fails on devices #60581

Closed
steveisok opened this issue Oct 18, 2021 · 2 comments · Fixed by #69583
Assignees
Milestone

Comments

@steveisok
Copy link
Member

Most likely not taking into account platform specifics re: permissions

The test fails with:

Assert.Equal() Failure
Expected: 3968
Actual:   896

at System.IO.Compression.Tests.ZipFile_Unix.<UnixCreateSetsPermissionsInExternalAttributes>g__EnsureExternalAttributes|0_0(String permissions, ZipArchiveEntry entry)
   at System.IO.Compression.Tests.ZipFile_Unix.UnixCreateSetsPermissionsInExternalAttributes()
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.IO.Compression untriaged New issue has not been triaged by the area owner labels Oct 18, 2021
@ghost
Copy link

ghost commented Oct 18, 2021

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

Issue Details

Most likely not taking into account platform specifics re: permissions

The test fails with:

Assert.Equal() Failure
Expected: 3968
Actual:   896

at System.IO.Compression.Tests.ZipFile_Unix.<UnixCreateSetsPermissionsInExternalAttributes>g__EnsureExternalAttributes|0_0(String permissions, ZipArchiveEntry entry)
   at System.IO.Compression.Tests.ZipFile_Unix.UnixCreateSetsPermissionsInExternalAttributes()
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Author: steveisok
Assignees: -
Labels:

area-System.IO.Compression, untriaged

Milestone: -

@carlossanlop
Copy link
Member

Also affecting the release/6.0 branch. I'm disabling the tests there too: #68867

When this issue gets fixed, the fix needs to get backported to release/6.0.

eerhardt added a commit to eerhardt/runtime that referenced this issue May 19, 2022
…pple OSes

There are scenarios where chmod succeeds, but the OS clears certain bits, like S_ISGID and S_ISUID. When this happens, the ZipFile tests fail because the .zip file doesn't contain the expected ExternalAttributes.

To fix this, read the file mode after calling chmod, and update the expected file mode so the tests still pass.

Fix dotnet#68293
Fix dotnet#60581
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 19, 2022
@eerhardt eerhardt self-assigned this May 19, 2022
jozkee pushed a commit that referenced this issue May 20, 2022
…pple OSes (#69583)

* ZipFile UnixCreateSetsPermissionsInExternalAttributes test fails on Apple OSes

There are scenarios where chmod succeeds, but the OS clears certain bits, like S_ISGID and S_ISUID. When this happens, the ZipFile tests fail because the .zip file doesn't contain the expected ExternalAttributes.

To fix this, read the file mode after calling chmod, and update the expected file mode so the tests still pass.

Fix #68293
Fix #60581

* Fix the tests to expect the correct file name
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 20, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants