-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[libraries] Update System.Runtime.Extensions tests for iOS,MacCatalyst,tvOS #57210
Merged
danmoseley
merged 6 commits into
dotnet:main
from
mdh1418:ios_tvos_reenable_crashing_suites
Aug 14, 2021
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7952816
[libraries] Update AppDomainTests for iOS,MacCatalyst,tvOS
400dbab
Update skip reasons
8fb92db
Add MacCatalyst to Case Insensitive and remove ActiveIssues
cf87ed3
Replace ActiveIssue with ConditionalTheory based on RemoteExecutor
8d500d9
Fix test for iOS/tvOS/Catalyst
akoeplinger 4151ce2
Skip UserName test on iOS tvOS
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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 expect that this test can be fixed to be valid on Catalyst? Catalyst is generally like iOS.
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.
Yeah Catalyst has the same behavior as iOS here. We can actually enable parts of the test since we just use a different value for
SpecialFolder.Personal
/SpecialFolder.MyDocuments
. Will push to the PR.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.
Looking more closely, it looks like
Environment.GetEnvironmentVariable("Home")
isnull
or empty on iOSSimulator and tvOSSimulator. However, on MacCatalyst, it seems to be/Users/mdhwang
and the tests expected paths areEnvironment.GetFolderPath(Environment.SpecialFolder.Personal)
evaluates to/Users/mdhwang/Documents
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
evaluates to/Users/mdhwang/Documents
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
evaluates to/Users/mdhwang
However, it seems like a previous tvOSSimulator's failure message was
Assert.Equal() Failure\n ↓ (pos 161)\nExpected: ···F1-ADDB-B49F66D98B32\nActual: ···F1-ADDB-B49F66D98B32/Documents\n ↑ (pos 161)
which suggests that sometimes theHome
environment variable is not empty ornull
? possibly flakey?@filipnavara
Could you elaborate on why its not valid for iOS/tvOS?
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.
Hm I tried with preview7 on iOSSimulator and
Environment.GetEnvironmentVariable("HOME")
returned a path there. did you test withHome
orHOME
?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.
On iOS:
NSSearchPathDirectory.NSDocumentDirectory
UserProfile
return theHOME
environment variable. I remember testing it but I don't remember the value anymore, my previous comment would imply that it wasnull
On tvOS:
NSSearchPathDirectory.NSDocumentDirectory
is read-only so Personal/MyDocuments intentionally does NOT return it. At least that was the situation on old Mono. Apparently the code was not ported for .NET 6 and it's still tracked as an issue - Change Environment.GetFolderPath to be compatible with tvOS #34007There 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.
I used
HOME
and I temporarily modified the test for these OSes and it passes on MacCatalyst after this modification.The most recent run locally on preview 6 was
Assert.Equal() Failure\nExpected: (null)\nActual: /Users/mdhwang/Library/Developer/CoreSimulator/Devices/71D00C72-A1BD-4EF7-87EA-B22842EC1650/data/Containers/Data/Application/E3609B50-9E46-4864-A413-A1C506C5295D/Documents