Skip to content

Give tvOS a special value for Personal/MyDocuments - #57508

Merged
directhex merged 36 commits into
dotnet:mainfrom
directhex:tvos-specialdirectories
Aug 24, 2021
Merged

Give tvOS a special value for Personal/MyDocuments#57508
directhex merged 36 commits into
dotnet:mainfrom
directhex:tvos-specialdirectories

Conversation

@directhex

@directhexdirecthex commented Aug 16, 2021

Copy link
Copy Markdown
Contributor

Fixes#34007
Fixes#57638

@ghost

Copy link
Copy Markdown

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@steveisok
steveisok self-requested a review August 17, 2021 02:36
@steveisok

Copy link
Copy Markdown
Member

@directhex Looks like the test fails with:

FileCleanupTestBase failed to create /tmp/EnvironmentTests_kvqum5t0.rc2. System.UnauthorizedAccessException: Access to the path '/tmp/EnvironmentTests_2duc5dna.12u' is denied.
System.IO.IOException: Operation not permitted\n --- End of inner exception stack trace ---
System.IO.FileSystem.CreateDirectory(String fullPath)\n at System.IO.Directory.CreateDirectory(String path)
at System.IO.FileCleanupTestBase..ctor(String tempDirectory)\nSystem.UnauthorizedAccessException: Access to the path '/tmp/EnvironmentTests_u3jh2qus.e4b' is denied.\n ---> System.IO.IOException: Operation not permitted
--- End of inner exception stack trace ---\n at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)\n at System.IO.FileCleanupTestBase..ctor(String tempDirectory)\nSystem.UnauthorizedAccessException: Access to the path '/tmp/EnvironmentTests_kvqum5t0.rc2' is denied.
---> System.IO.IOException: Operation not permitted\n --- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)\n at System.IO.Directory.CreateDirectory(String path)
at System.IO.FileCleanupTestBase..ctor(String tempDirectory)
Expected: True
Actual: False

@directhex

directhex commented Aug 18, 2021

Copy link
Copy Markdown
ContributorAuthor

@directhex Looks like the test fails with:

FileCleanupTestBase failed to create /tmp/EnvironmentTests_kvqum5t0.rc2. System.UnauthorizedAccessException: Access to the path '/tmp/EnvironmentTests_2duc5dna.12u' is denied.
System.IO.IOException: Operation not permitted\n --- End of inner exception stack trace ---
System.IO.FileSystem.CreateDirectory(String fullPath)\n at System.IO.Directory.CreateDirectory(String path)
at System.IO.FileCleanupTestBase..ctor(String tempDirectory)\nSystem.UnauthorizedAccessException: Access to the path '/tmp/EnvironmentTests_u3jh2qus.e4b' is denied.\n ---> System.IO.IOException: Operation not permitted
--- End of inner exception stack trace ---\n at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)\n at System.IO.FileCleanupTestBase..ctor(String tempDirectory)\nSystem.UnauthorizedAccessException: Access to the path '/tmp/EnvironmentTests_kvqum5t0.rc2' is denied.
---> System.IO.IOException: Operation not permitted\n --- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)\n at System.IO.Directory.CreateDirectory(String path)
at System.IO.FileCleanupTestBase..ctor(String tempDirectory)
Expected: True
Actual: False

Not guilty. I reverted all my changes to System.Environment, and the device build still fails.

/tmp is readonly on device. Path.GetTempPath is what fails, and it's not due to my changes.

@carlossanlopcarlossanlop added the os-tvos Apple tvOS label Aug 18, 2021
@directhex
directhex marked this pull request as ready for review August 18, 2021 17:37
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.iOS.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.iOS.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.iOS.cs Outdated
directhexand others added 2 commits August 23, 2021 14:22
…OS.cs
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
…OS.cs
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.iOS.cs Outdated
…OS.cs
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.NoniOS.cs Outdated
directhexand others added 2 commits August 23, 2021 15:07
…oniOS.cs
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.iOS.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.iOS.cs Outdated
@directhex

Copy link
Copy Markdown
ContributorAuthor

i can't get a dang thing to run on my iPhone 😠

@directhex
directhex merged commit 591e96b into dotnet:mainAug 24, 2021
@directhex

Copy link
Copy Markdown
ContributorAuthor

/backport to release/6.0-rc1

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/6.0-rc1: https://github.com/dotnet/runtime/actions/runs/1163777452

@github-actions

Copy link
Copy Markdown
Contributor

@directhex backporting to release/6.0-rc1 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Use a different Personal folder on tvOS, and a test that it works
Applying: Run this PR on device, the error does not happen on sim
Applying: CI fixes
Applying: Nullable
Applying: Test on devices
Applying: Just run one test to save disk space
Applying: Tweak to run only 1 test and make sure DevTeamProvisioning is right
Applying: Horrible hack to check something in CI
Applying: Revert all changes. Run as-is in CI to see if it's my changes to blameApplying: nonsenseApplying: Set temp path to a valid locationApplying: Fix AppDomainTests.ExecuteAssembly to copy files to a valid placeApplying: Don't expect HOME to work on tvOS
Applying: We cannot get exit code from tvOS device, so runonly tests don't workApplying: Revert infra changes made to enable CI of this PR, which passes now on deviceerror: sha1 information is lacking or useless (eng/testing/tests.mobile.targets).error: could not build fake ancestorhint: Use 'git am --show-current-patch=diff' to see the failed patchPatch failed at 0015 Revert infra changes made to enable CI of this PR, which passes now on deviceWhen you have resolved this problem, run "git am --continue".If you prefer to skip this patch, run "git am --skip" instead.To restore the original branch and stop patching, run "git am --abort".Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@marek-safar

Copy link
Copy Markdown
Contributor

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1175024534

@github-actions

Copy link
Copy Markdown
Contributor

@marek-safar backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Use a different Personal folder on tvOS, and a test that it works
Applying: Run this PR on device, the error does not happen on sim
Applying: CI fixes
Applying: Nullable
Applying: Test on devices
Applying: Just run one test to save disk space
Applying: Tweak to run only 1 test and make sure DevTeamProvisioning is right
Applying: Horrible hack to check something in CI
Applying: Revert all changes. Run as-is in CI to see if it's my changes to blameApplying: nonsenseApplying: Set temp path to a valid locationApplying: Fix AppDomainTests.ExecuteAssembly to copy files to a valid placeApplying: Don't expect HOME to work on tvOS
Applying: We cannot get exit code from tvOS device, so runonly tests don't workApplying: Revert infra changes made to enable CI of this PR, which passes now on deviceerror: sha1 information is lacking or useless (eng/testing/tests.mobile.targets).error: could not build fake ancestorhint: Use 'git am --show-current-patch=diff' to see the failed patchPatch failed at 0015 Revert infra changes made to enable CI of this PR, which passes now on deviceWhen you have resolved this problem, run "git am --continue".If you prefer to skip this patch, run "git am --skip" instead.To restore the original branch and stop patching, run "git am --abort".Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@directhex

Copy link
Copy Markdown
ContributorAuthor

@marek something about one of the commits in this PR angers the backport bot, I've issued a backport from the release/6.0-rc1 backport, which should be fine: #58286

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

os-tvosApple tvOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/tmp not writable on tvOS device, breaking Path.GetTempPath Change Environment.GetFolderPath to be compatible with tvOS

7 participants

@directhex@steveisok@marek-safar@akoeplinger@am11@premun@carlossanlop