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

[tests][tvOS] Some System.IO tests are failing #67853

Closed
simonrozsival opened this issue Apr 11, 2022 · 9 comments · Fixed by #74927
Closed

[tests][tvOS] Some System.IO tests are failing #67853

simonrozsival opened this issue Apr 11, 2022 · 9 comments · Fixed by #74927
Assignees
Labels
area-System.IO disabled-test The test is disabled in source code against the issue os-tvos Apple tvOS
Milestone

Comments

@simonrozsival
Copy link
Member

simonrozsival commented Apr 11, 2022

OS: tvOS
Architecture: arm64
Configuration: release
Runtime: mono

It appears that some System.IO tests on tvOS have been silently failing for at least a month. The #67746 bugfix removes a crash that prevented xharness from reporting the test failures properly (e.g. rolling build from 4/10 with this System.IO.Tests output).

The following tests are failing:

  • DevicesPipesAndSockets.NamedPipe_ReadWrite
  • DevicesPipesAndSockets.NamedPipe_ReadWrite_Async
  • NamedPipeFileStreamConnectedConformanceTests.Dispose_ClosesStream
  • NamedPipeFileStreamConnectedConformanceTests.Read_Eof_Returns0
  • NamedPipeFileStreamConnectedConformanceTests.Disposed_ThrowsObjectDisposedException
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteWrite_OtherDataReceivedSuccessfully
  • NamedPipeFileStreamConnectedConformanceTests.Read_DataStoredAtDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentTaskSchedulerIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Write_DataReadFromDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentSynchronizationContextIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ArgumentValidation_ThrowsExpectedException
  • NamedPipeFileStreamConnectedConformanceTests.ReadTimeout_Expires_Throws
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnWriteableStreamWithNoData_Success
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteRead_BlocksUntilDataAvailableOrNops
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingValueTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteAsync_PrecanceledOperations_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Timeout_Roundtrips
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_CustomMemoryManager_Success
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnReadableStream_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteByte_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_MessagesSmallerThanReadBuffer_Success
  • NamedPipeFileStreamConnectedConformanceTests.CopyToAsync_AllDataCopied
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_Success
  • Directory_ExistsAsFile.FalseForNonRegularFile
  • DirectoryInfo_EnumFSI_str_str.SearchPatternCaseSensitive
  • FileInfo_Exists.TrueForNonRegularFile
  • Directory_Delete_str_bool.ExtendedDirectoryWithSubdirectories
  • Directory_Delete_str_bool.LongPathExtendedDirectory
  • File_GetSetAttributesCommon.SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(attributes: Hidden)
  • Directory_CreateDirectory.DriveLetter_Unix
  • Directory_EnumFSE_str_str_so.SearchPatternCaseSensitive
  • File_ReadWriteAllBytes.ReadAllBytes_NonSeekableFileStream_InUnix
  • FileInfo_GetSetAttributesCommon.SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(attributes: Hidden)
  • PathFile_Exists.TrueForNonRegularFile
  • DirectoryInfo_Delete_bool.ExtendedDirectoryWithSubdirectories
  • DirectoryInfo_Delete_bool.LongPathExtendedDirectory
  • File_ReadWriteAllBytesAsync.ReadAllBytesAsync_NonSeekableFileStream_InUnix
  • File_ExistsAsDirectory.FalseForNonRegularFile
  • Directory_GetLogicalDrives.GetsValidDriveStrings_Unix
  • DirectoryInfo_Create.DriveLetter_Unix
  • DirectoryInfo_Exists.FalseForNonRegularFile
  • DirectoryInfo_Delete.ExtendedDirectoryWithSubdirectories
  • DirectoryInfo_Delete.LongPathExtendedDirectory
  • Directory_Delete_str.ExtendedDirectoryWithSubdirectories
  • Directory_Delete_str.LongPathExtendedDirectory
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.IO untriaged New issue has not been triaged by the area owner labels Apr 11, 2022
@ghost
Copy link

ghost commented Apr 11, 2022

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

Issue Details

OS: tvOS
Architecture: arm64
Configuration: release
Runtime: mono

It appears that some System.IO tests on tvOS have been silently failing for at least a month. The #67746 bugfix removes a crash that prevented xharness from reporting the test failures properly (e.g. rolling build from 4/10 with this System.IO.Tests output).

The following tests are failing:

  • DevicesPipesAndSockets.NamedPipe_ReadWrite
  • DevicesPipesAndSockets.NamedPipe_ReadWrite_Async
  • NamedPipeFileStreamConnectedConformanceTests.Dispose_ClosesStream
  • NamedPipeFileStreamConnectedConformanceTests.Read_Eof_Returns0
  • NamedPipeFileStreamConnectedConformanceTests.Disposed_ThrowsObjectDisposedException
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteWrite_OtherDataReceivedSuccessfully
  • NamedPipeFileStreamConnectedConformanceTests.Read_DataStoredAtDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentTaskSchedulerIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Write_DataReadFromDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentSynchronizationContextIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ArgumentValidation_ThrowsExpectedException
  • NamedPipeFileStreamConnectedConformanceTests.ReadTimeout_Expires_Throws
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnWriteableStreamWithNoData_Success
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteRead_BlocksUntilDataAvailableOrNops
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingValueTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteAsync_PrecanceledOperations_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Timeout_Roundtrips
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_CustomMemoryManager_Success
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnReadableStream_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteByte_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_MessagesSmallerThanReadBuffer_Success
  • NamedPipeFileStreamConnectedConformanceTests.CopyToAsync_AllDataCopied
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_Success
  • Directory_ExistsAsFile.FalseForNonRegularFile
  • DirectoryInfo_EnumFSI_str_str.SearchPatternCaseSensitive
  • FileInfo_Exists.TrueForNonRegularFile
  • Directory_Delete_str_bool.ExtendedDirectoryWithSubdirectories
  • Directory_Delete_str_bool.LongPathExtendedDirectory
  • File_GetSetAttributesCommon.SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(attributes: Hidden)
  • Directory_CreateDirectory.DriveLetter_Unix
  • Directory_EnumFSE_str_str_so.SearchPatternCaseSensitive
  • File_ReadWriteAllBytes.ReadAllBytes_NonSeekableFileStream_InUnix
  • FileInfo_GetSetAttributesCommon.SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(attributes: Hidden)
  • DevicesPipesAndSockets.NamedPipe_ReadWrite
  • DevicesPipesAndSockets.NamedPipe_ReadWrite_Async
  • NamedPipeFileStreamConnectedConformanceTests.Read_DataStoredAtDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnWriteableStreamWithNoData_Success
  • NamedPipeFileStreamConnectedConformanceTests.Disposed_ThrowsObjectDisposedException
  • NamedPipeFileStreamConnectedConformanceTests.ReadTimeout_Expires_Throws
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.ArgumentValidation_ThrowsExpectedException
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentTaskSchedulerIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.CopyToAsync_AllDataCopied
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_CustomMemoryManager_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_MessagesSmallerThanReadBuffer_Success
  • NamedPipeFileStreamConnectedConformanceTests.Dispose_ClosesStream
  • NamedPipeFileStreamConnectedConformanceTests.Write_DataReadFromDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteWrite_OtherDataReceivedSuccessfully
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingValueTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentSynchronizationContextIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteRead_BlocksUntilDataAvailableOrNops
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnReadableStream_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteAsync_PrecanceledOperations_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Timeout_Roundtrips
  • NamedPipeFileStreamConnectedConformanceTests.Read_Eof_Returns0
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteByte_Success
  • PathFile_Exists.TrueForNonRegularFile
  • DirectoryInfo_Delete_bool.ExtendedDirectoryWithSubdirectories
  • DirectoryInfo_Delete_bool.LongPathExtendedDirectory
  • File_ReadWriteAllBytesAsync.ReadAllBytesAsync_NonSeekableFileStream_InUnix
  • File_ExistsAsDirectory.FalseForNonRegularFile
  • Directory_GetLogicalDrives.GetsValidDriveStrings_Unix
  • DirectoryInfo_Create.DriveLetter_Unix
  • DirectoryInfo_Exists.FalseForNonRegularFile
  • DirectoryInfo_Delete.ExtendedDirectoryWithSubdirectories
  • DirectoryInfo_Delete.LongPathExtendedDirectory
  • Directory_Delete_str.ExtendedDirectoryWithSubdirectories
  • Directory_Delete_str.LongPathExtendedDirectory
Author: simonrozsival
Assignees: -
Labels:

area-System.IO, untriaged

Milestone: -

@lambdageek lambdageek added the os-tvos Apple tvOS label Apr 11, 2022
@ghost
Copy link

ghost commented Apr 11, 2022

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

Issue Details

OS: tvOS
Architecture: arm64
Configuration: release
Runtime: mono

It appears that some System.IO tests on tvOS have been silently failing for at least a month. The #67746 bugfix removes a crash that prevented xharness from reporting the test failures properly (e.g. rolling build from 4/10 with this System.IO.Tests output).

The following tests are failing:

  • DevicesPipesAndSockets.NamedPipe_ReadWrite
  • DevicesPipesAndSockets.NamedPipe_ReadWrite_Async
  • NamedPipeFileStreamConnectedConformanceTests.Dispose_ClosesStream
  • NamedPipeFileStreamConnectedConformanceTests.Read_Eof_Returns0
  • NamedPipeFileStreamConnectedConformanceTests.Disposed_ThrowsObjectDisposedException
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteWrite_OtherDataReceivedSuccessfully
  • NamedPipeFileStreamConnectedConformanceTests.Read_DataStoredAtDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentTaskSchedulerIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Write_DataReadFromDesiredOffset
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_ContinuesOnCurrentSynchronizationContextIfDesired
  • NamedPipeFileStreamConnectedConformanceTests.ArgumentValidation_ThrowsExpectedException
  • NamedPipeFileStreamConnectedConformanceTests.ReadTimeout_Expires_Throws
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnWriteableStreamWithNoData_Success
  • NamedPipeFileStreamConnectedConformanceTests.ZeroByteRead_BlocksUntilDataAvailableOrNops
  • NamedPipeFileStreamConnectedConformanceTests.ReadAsync_CancelPendingValueTask_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteAsync_PrecanceledOperations_ThrowsCancellationException
  • NamedPipeFileStreamConnectedConformanceTests.Timeout_Roundtrips
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_CustomMemoryManager_Success
  • NamedPipeFileStreamConnectedConformanceTests.Flush_ValidOnReadableStream_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWriteByte_Success
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_MessagesSmallerThanReadBuffer_Success
  • NamedPipeFileStreamConnectedConformanceTests.CopyToAsync_AllDataCopied
  • NamedPipeFileStreamConnectedConformanceTests.ReadWrite_Success
  • Directory_ExistsAsFile.FalseForNonRegularFile
  • DirectoryInfo_EnumFSI_str_str.SearchPatternCaseSensitive
  • FileInfo_Exists.TrueForNonRegularFile
  • Directory_Delete_str_bool.ExtendedDirectoryWithSubdirectories
  • Directory_Delete_str_bool.LongPathExtendedDirectory
  • File_GetSetAttributesCommon.SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(attributes: Hidden)
  • Directory_CreateDirectory.DriveLetter_Unix
  • Directory_EnumFSE_str_str_so.SearchPatternCaseSensitive
  • File_ReadWriteAllBytes.ReadAllBytes_NonSeekableFileStream_InUnix
  • FileInfo_GetSetAttributesCommon.SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(attributes: Hidden)
  • PathFile_Exists.TrueForNonRegularFile
  • DirectoryInfo_Delete_bool.ExtendedDirectoryWithSubdirectories
  • DirectoryInfo_Delete_bool.LongPathExtendedDirectory
  • File_ReadWriteAllBytesAsync.ReadAllBytesAsync_NonSeekableFileStream_InUnix
  • File_ExistsAsDirectory.FalseForNonRegularFile
  • Directory_GetLogicalDrives.GetsValidDriveStrings_Unix
  • DirectoryInfo_Create.DriveLetter_Unix
  • DirectoryInfo_Exists.FalseForNonRegularFile
  • DirectoryInfo_Delete.ExtendedDirectoryWithSubdirectories
  • DirectoryInfo_Delete.LongPathExtendedDirectory
  • Directory_Delete_str.ExtendedDirectoryWithSubdirectories
  • Directory_Delete_str.LongPathExtendedDirectory
Author: simonrozsival
Assignees: -
Labels:

area-System.IO, untriaged, os-tvos

Milestone: -

@simonrozsival
Copy link
Member Author

There is some overlap with #51371

@steveisok
Copy link
Member

A lot of the failures are asserting at

Assert.True(availableLength >= MinAvailableForSufficientRandomness, $"UDS prefix {prefix} length {prefix.Length} is too long");

#63877 was intended to fix these issues and it appears they did on iOSSimulator, but we got a false positive from CI when it came to devices.

@lambdageek lambdageek added the disabled-test The test is disabled in source code against the issue label Apr 11, 2022
@adamsitnik adamsitnik removed the untriaged New issue has not been triaged by the area owner label Apr 21, 2022
@steveisok steveisok added this to the 7.0.0 milestone Jul 18, 2022
steveisok pushed a commit to steveisok/runtime that referenced this issue Jul 20, 2022
A newline was incorrectly added to the script that executes xharness, causing the script to return a 0 exit code even if there was a crash.  This caused CI to report a pass no matter what.  System.IO.Tests was the only suite found where this had an impact.

Contributes to dotnet#67853
mkhamoyan added a commit that referenced this issue Jul 27, 2022
@mkhamoyan
Copy link
Contributor

Closing as duplicate of #51390
After #51390 is fixed , will enable all these tests

directhex added a commit to directhex/runtime that referenced this issue Aug 3, 2022
tvOS has a MAX_PATH of 104 characters on domain sockets, and a 90 character
value for GetTempPath. That gives us only 14 characters to play with, and
temp filenames are 12 characters long. We cannot afford the `CoreFxPipe_`
prefix on tvOS, with our tiny character path budget.

Check whether this fixes some or all of dotnet#67853 and dotnet#51390 too.
mkhamoyan added a commit that referenced this issue Aug 3, 2022
@directhex
Copy link
Contributor

Reopening. This issue is a collection of entirely unrelated issues, and likely not even tvOS specific. We have dozens of ActiveIssue for this bug number, will close when those are handled.

@directhex directhex reopened this Aug 5, 2022
directhex added a commit to directhex/runtime that referenced this issue Aug 5, 2022
@directhex directhex assigned directhex and unassigned mkhamoyan Aug 5, 2022
@directhex
Copy link
Contributor

This is actually a mix of three distinct bugs:

  • Tests failing which rely on Named Pipes or Unix Domain Sockets
  • Tests failing which assume cwd is writeable
  • Tests failing which assume the filesystem case sensitivity behaviour, but are wrong (this is especially annoying, as tvOS is inconsistent with tvOSSimulator)

@directhex
Copy link
Contributor

directhex commented Aug 8, 2022

Okay then. Detailed failures info:

Unexpected behaviour with mkfifo:

System.IO.Tests.PathFile_Exists.TrueForNonRegularFile
System.IO.Tests.FileInfo_Exists.TrueForNonRegularFile
System.IO.Tests.DirectoryInfo_Exists.FalseForNonRegularFile
System.IO.Tests.File_ReadWriteAllBytesAsync.ReadAllBytesAsync_NonSeekableFileStream_InUnix
System.IO.Tests.File_ExistsAsDirectory.FalseForNonRegularFile
System.IO.Tests.Directory_ExistsAsFile.FalseForNonRegularFile
System.IO.Tests.File_ReadWriteAllBytes.ReadAllBytes_NonSeekableFileStream_InUnix

throws:

Assert.Equal() Failure
Expected: 0
Actual:   -1

Assumes writable app directory:

System.IO.Tests.Directory_CreateDirectory.DriveLetter_Unix
System.IO.Tests.DirectoryInfo_Create.DriveLetter_Unix
System.IO.Tests.CreateDirectoryWithUnixFileMode.DriveLetter_Unix

throws:

System.UnauthorizedAccessException : Access to the path '/private/var/containers/Bundle/Application/4DE3DC40-5DBA-4461-B77E-737E989BF256/System.IO.FileSystem.Tests.app/C:' is denied.
---- System.IO.IOException : Operation not permitted

Trying to use Windows UNC from app directory:

System.IO.Tests.DirectoryInfo_Delete.ExtendedDirectoryWithSubdirectories
System.IO.Tests.DirectoryInfo_Delete.LongPathExtendedDirectory
System.IO.Tests.DirectoryInfo_Delete_bool.ExtendedDirectoryWithSubdirectories
System.IO.Tests.DirectoryInfo_Delete_bool.LongPathExtendedDirectory
System.IO.Tests.Directory_Delete_str.ExtendedDirectoryWithSubdirectories
System.IO.Tests.Directory_Delete_str.LongPathExtendedDirectory
System.IO.Tests.Directory_Delete_str_bool.ExtendedDirectoryWithSubdirectories
System.IO.Tests.Directory_Delete_str_bool.LongPathExtendedDirectory

throws:

System.UnauthorizedAccessException : Access to the path '/private/var/containers/Bundle/Application/4DE3DC40-5DBA-4461-B77E-737E989BF256/System.IO.FileSystem.Tests.app/\\\\?\\' is denied.
---- System.IO.IOException : Operation not permitted

directhex added a commit to directhex/runtime that referenced this issue Aug 8, 2022
@directhex directhex modified the milestones: 7.0.0, 8.0.0 Aug 8, 2022
@directhex
Copy link
Contributor

Gotta use remote executor to use SetCurrentDirectory to fix the UNC & drive letter tests, apparently.

directhex added a commit to directhex/runtime that referenced this issue Sep 1, 2022
non-Windows out of the app's working directory, which is readonly on
some platforms.

Closes: dotnet#67853
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 1, 2022
adamsitnik pushed a commit that referenced this issue Oct 26, 2022
* Use SetCurrentDirectory on tests which use an unrooted path on
non-Windows out of the app's working directory, which is readonly on
some platforms.

Closes: #67853

* Just blank out mkfifo tests
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO disabled-test The test is disabled in source code against the issue os-tvos Apple tvOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants