dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.98k stars 4.66k forks source link

[tvOS] System.Diagnostics.TraceSource.Config.Tests failing #74244

Open simonrozsival opened 2 years ago

simonrozsival commented 2 years ago

Originally reported in #74076 Most likely introduced in #73087 Sample test results: https://dev.azure.com/dnceng/public/_build/results?buildId=1948701&view=results

Exception which causes the failures:

System.UnauthorizedAccessException : Access to the path '/private/var/containers/Bundle/Application/C051ED5D-1DCA-43F6-B41B-04A9592B3F5F/System.Diagnostics.TraceSource.Config.Tests.app/AppleTestRunner.dll.config' is denied.
---- System.IO.IOException : Operation not permitted
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode, Func`4 createOpenException)
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at System.Diagnostics.TraceSourceConfigTests.ConfigurationTests.CreateAndLoadConfigFile(String filename)
   at System.Diagnostics.TraceSourceConfigTests.ConfigurationTests.Refresh_ChangeSwitch()
   at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
----- Inner Stack Trace -----
ghost commented 2 years ago

Tagging subscribers to 'os-tvos': @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.

Issue Details
Originally reported in #74076 Most likely introduced in #73087 Sample test results: https://dev.azure.com/dnceng/public/_build/results?buildId=1948701&view=results
Author: simonrozsival
Assignees: -
Labels: `disabled-test`, `os-tvos`, `area-System.Diagnostics.TraceSource`
Milestone: -
danmoseley commented 2 years ago

Test logs are deleted after not very long. It is best to paste in the useful parts into issues like this.

akoeplinger commented 2 years ago

We can't write to the app location in tvOS, we'll need to use the temp path here.