-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Skip mode check on Android tests when extracting tar files #74183
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
Conversation
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsTest fix on Android platforms.
|
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.
Is this a long term fix? ie., we have no hope of verifying perms on Android? (Presumably we care what they are..)
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Found in the 7.0-rc1 -> 7 PR: #74045 |
@@ -409,7 +409,8 @@ protected static void AssertEntryModeFromFileSystemEquals(TarEntry entry, UnixFi | |||
|
|||
protected static void AssertFileModeEquals(string path, UnixFileMode mode) | |||
{ | |||
if (!PlatformDetection.IsWindows) | |||
if (!PlatformDetection.IsWindows && | |||
!PlatformDetection.IsAndroid) // Android may change the requested permissions.) |
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.
Do you have any docs/links/etc or more information on exactly what/why Android is changing the requested permissions?
I found these explanations: https://android.stackexchange.com/a/208927 They are written by the same individual, and the cited sources eventually took me to this: https://source.android.com/docs/core/storage/config Which explains that "the external storage is emulated and permissionless". I found the first stackexchange explanation quite helpful:
I am making the assumption that our tests are running in the external storage, since we can't seem to be able to change mode. |
Wouldn't that mean any test that is manipulating the file mode should be failing on Android? For example, this test: runtime/src/libraries/System.IO.FileSystem/tests/Base/BaseGetSetUnixFileMode.cs Lines 93 to 109 in 64d27bb
|
I think this is I'll improve the change in #74002. |
New extra-platforms run on #74002 doesn't show errors related to |
Test fix on Android platforms.
Originally written by @tmds in this PR commit: daed79e
We discovered this failure in runtime-extra-platforms, which doesn't get executed often. Android is changing the mode and we cannot reliably compare it.
Will backport it to RC1 after merging.