diff --git a/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs b/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs index 792e5387fd04aa..104849c23196b2 100644 --- a/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs +++ b/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs @@ -711,6 +711,7 @@ public abstract class StandaloneStreamConformanceTests : StreamConformanceTests } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ArgumentValidation_ThrowsExpectedException() { await foreach (Stream? stream in GetStreamsForValidation()) @@ -724,6 +725,7 @@ public virtual async Task ArgumentValidation_ThrowsExpectedException() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Disposed_ThrowsObjectDisposedException() { await foreach (Stream? stream in GetStreamsForValidation()) @@ -788,6 +790,7 @@ public virtual async Task Write_Nop_Success(ReadWriteMode mode) [InlineData(ReadWriteMode.SyncArray)] [InlineData(ReadWriteMode.AsyncArray)] [InlineData(ReadWriteMode.AsyncAPM)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Read_DataStoredAtDesiredOffset(ReadWriteMode mode) { const byte Expected = 42; @@ -1596,6 +1599,7 @@ protected static bool Bidirectional(StreamPair streams) => streams.Stream2.CanRead && streams.Stream2.CanWrite; [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ArgumentValidation_ThrowsExpectedException() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1607,6 +1611,7 @@ public virtual async Task ArgumentValidation_ThrowsExpectedException() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Disposed_ThrowsObjectDisposedException() { StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1619,6 +1624,7 @@ public virtual async Task Disposed_ThrowsObjectDisposedException() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadWriteAsync_PrecanceledOperations_ThrowsCancellationException() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1630,6 +1636,7 @@ public virtual async Task ReadWriteAsync_PrecanceledOperations_ThrowsCancellatio } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadAsync_CancelPendingTask_ThrowsCancellationException() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1639,6 +1646,7 @@ public virtual async Task ReadAsync_CancelPendingTask_ThrowsCancellationExceptio } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadAsync_CancelPendingValueTask_ThrowsCancellationException() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1648,6 +1656,7 @@ public virtual async Task ReadAsync_CancelPendingValueTask_ThrowsCancellationExc } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadWriteByte_Success() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1720,6 +1729,7 @@ public virtual async Task ReadWrite_Success_Large(ReadWriteMode mode, int writeS [Theory] [MemberData(nameof(ReadWrite_Success_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadWrite_Success(ReadWriteMode mode, int writeSize, bool startWithFlush) { foreach (CancellationToken nonCanceledToken in new[] { CancellationToken.None, new CancellationTokenSource().Token }) @@ -1776,6 +1786,7 @@ public virtual async Task ReadWrite_Success(ReadWriteMode mode, int writeSize, b [Theory] [MemberData(nameof(ReadWrite_Modes))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadWrite_MessagesSmallerThanReadBuffer_Success(ReadWriteMode mode) { if (!FlushGuaranteesAllDataWritten) @@ -1824,6 +1835,7 @@ public virtual async Task ReadWrite_MessagesSmallerThanReadBuffer_Success(ReadWr [Theory] [MemberData(nameof(AllReadWriteModesAndValue), false)] [MemberData(nameof(AllReadWriteModesAndValue), true)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Read_Eof_Returns0(ReadWriteMode mode, bool dataAvailableFirst) { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1862,6 +1874,7 @@ public virtual async Task Read_Eof_Returns0(ReadWriteMode mode, bool dataAvailab [InlineData(ReadWriteMode.SyncArray)] [InlineData(ReadWriteMode.AsyncArray)] [InlineData(ReadWriteMode.AsyncAPM)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Read_DataStoredAtDesiredOffset(ReadWriteMode mode) { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1891,6 +1904,7 @@ public virtual async Task Read_DataStoredAtDesiredOffset(ReadWriteMode mode) [InlineData(ReadWriteMode.SyncArray)] [InlineData(ReadWriteMode.AsyncArray)] [InlineData(ReadWriteMode.AsyncAPM)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Write_DataReadFromDesiredOffset(ReadWriteMode mode) { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -1989,6 +2003,7 @@ public static IEnumerable ReadAsync_ContinuesOnCurrentContextIfDesired [Theory] [MemberData(nameof(ReadAsync_ContinuesOnCurrentContextIfDesired_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadAsync_ContinuesOnCurrentSynchronizationContextIfDesired(bool flowExecutionContext, bool? continueOnCapturedContext) { await default(JumpToThreadPoolAwaiter); // escape xunit sync ctx @@ -2071,6 +2086,7 @@ public virtual async Task ReadAsync_ContinuesOnCurrentSynchronizationContextIfDe [Theory] [MemberData(nameof(ReadAsync_ContinuesOnCurrentContextIfDesired_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadAsync_ContinuesOnCurrentTaskSchedulerIfDesired(bool flowExecutionContext, bool? continueOnCapturedContext) { await default(JumpToThreadPoolAwaiter); // escape xunit sync ctx @@ -2160,6 +2176,7 @@ await Task.Factory.StartNew(() => [InlineData(ReadWriteMode.AsyncMemory)] [InlineData(ReadWriteMode.SyncAPM)] [InlineData(ReadWriteMode.AsyncAPM)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ZeroByteRead_BlocksUntilDataAvailableOrNops(ReadWriteMode mode) { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2226,6 +2243,7 @@ public virtual async Task ZeroByteRead_BlocksUntilDataAvailableOrNops(ReadWriteM [InlineData(ReadWriteMode.AsyncMemory)] [InlineData(ReadWriteMode.SyncAPM)] [InlineData(ReadWriteMode.AsyncAPM)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ZeroByteWrite_OtherDataReceivedSuccessfully(ReadWriteMode mode) { byte[][] buffers = new[] { Array.Empty(), Encoding.UTF8.GetBytes("hello"), Array.Empty(), Encoding.UTF8.GetBytes("world") }; @@ -2279,6 +2297,7 @@ public virtual async Task ZeroByteWrite_OtherDataReceivedSuccessfully(ReadWriteM [Theory] [InlineData(false)] [InlineData(true)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadWrite_CustomMemoryManager_Success(bool useAsync) { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2399,6 +2418,7 @@ public virtual async Task CopyToAsync_AllDataCopied_Large(bool useAsync) => [Theory] [MemberData(nameof(CopyToAsync_AllDataCopied_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task CopyToAsync_AllDataCopied(int byteCount, bool useAsync) { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2436,6 +2456,7 @@ await Task.WhenAll(Enumerable.Range(0, 20).Select(_ => Task.Run(async () => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Timeout_Roundtrips() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2470,6 +2491,7 @@ public virtual async Task Timeout_Roundtrips() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task ReadTimeout_Expires_Throws() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2604,6 +2626,7 @@ public virtual async Task ReadAsync_DuringReadAsync_ThrowsIfUnsupported() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Flush_ValidOnWriteableStreamWithNoData_Success() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2618,6 +2641,7 @@ public virtual async Task Flush_ValidOnWriteableStreamWithNoData_Success() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Flush_ValidOnReadableStream_Success() { using StreamPair streams = await CreateConnectedStreamsAsync(); @@ -2635,6 +2659,7 @@ public virtual async Task Flush_ValidOnReadableStream_Success() [InlineData(0)] [InlineData(1)] [InlineData(2)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public virtual async Task Dispose_ClosesStream(int disposeMode) { if (!CansReturnFalseAfterDispose) diff --git a/src/libraries/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs b/src/libraries/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs index 18fc5106f9be70..0ba19c5b0505fa 100644 --- a/src/libraries/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs +++ b/src/libraries/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs @@ -65,6 +65,7 @@ public void SettingInvalidAttributes_Unix(FileAttributes attributes) [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsCaseSensitiveOS))] [InlineData(FileAttributes.Hidden)] [PlatformSpecific(TestPlatforms.AnyUnix & ~(TestPlatforms.OSX | TestPlatforms.FreeBSD))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(FileAttributes attributes) { string path = CreateItem(); diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs b/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs index af0c040223675d..444c02f6c79d93 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs @@ -468,6 +468,7 @@ public void DriveLetter_Windows() [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] // drive letters casing + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void DriveLetter_Unix() { // On Unix, there's no special casing for drive letters. These may or may not be valid names, depending diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/Delete.cs b/src/libraries/System.IO.FileSystem/tests/Directory/Delete.cs index 312105af65379c..829062b3f2f3ca 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/Delete.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/Delete.cs @@ -120,6 +120,7 @@ public void DeletingSymLinkDoesntDeleteTarget() } [ConditionalFact(nameof(UsingNewNormalization))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void ExtendedDirectoryWithSubdirectories() { DirectoryInfo testDir = Directory.CreateDirectory(IOInputs.ExtendedPrefix + GetTestFilePath()); @@ -129,6 +130,7 @@ public void ExtendedDirectoryWithSubdirectories() } [ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void LongPathExtendedDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(IOServices.GetPath(IOInputs.ExtendedPrefix + TestDirectory, characterCount: 500)); diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs b/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs index feaad06c3e0d2d..b5daf1323139b5 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/Exists.cs @@ -394,6 +394,7 @@ public void ExtendedPathAlreadyExistsAsFile() [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] // Makes call to native code (libc) + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void FalseForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs b/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs index 97d8ec20b07ed1..84fd450d3a090c 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs @@ -698,6 +698,7 @@ public void WindowsSearchPatternWhitespace() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsCaseSensitiveOS))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void SearchPatternCaseSensitive() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs b/src/libraries/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs index 0061ab46b077a9..3f0dc42e96e99d 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs @@ -11,6 +11,7 @@ public class Directory_GetLogicalDrives { [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] // Valid drive strings on Unix + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void GetsValidDriveStrings_Unix() { string[] drives = Directory.GetLogicalDrives(); diff --git a/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs b/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs index 9c076d4ddaeadd..d0f3d095d2da0f 100644 --- a/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/DirectoryInfo/Exists.cs @@ -109,6 +109,7 @@ public void FalseForFile() [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] // Uses P/Invokes + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void FalseForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/File/Exists.cs b/src/libraries/System.IO.FileSystem/tests/File/Exists.cs index ff2c8845bc58a3..48d87fc2b79466 100644 --- a/src/libraries/System.IO.FileSystem/tests/File/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/File/Exists.cs @@ -255,6 +255,7 @@ public void PathAlreadyExistsAsDirectory() [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] // Uses P/Invokes + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void FalseForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs b/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs index 4d3a96c80665a3..69c2c7208f4074 100644 --- a/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs +++ b/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs @@ -195,6 +195,7 @@ static async Task WaitConnectionAndWritePipeStreamAsync(NamedPipeServerStream na [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public async Task ReadAllBytes_NonSeekableFileStream_InUnix() { string fifoPath = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytesAsync.cs b/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytesAsync.cs index c7c4a4a13808bd..3ab0df3700484b 100644 --- a/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytesAsync.cs +++ b/src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytesAsync.cs @@ -205,6 +205,7 @@ static async Task WaitConnectionAndWritePipeStreamAsync(NamedPipeServerStream na [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public async Task ReadAllBytesAsync_NonSeekableFileStream_InUnix() { string fifoPath = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs b/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs index 4435b64befbccb..04e13706db6564 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs @@ -90,6 +90,7 @@ public void FalseForDirectory() [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] // Uses P/Invokes + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void TrueForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/FileStream/DevicesPipesAndSockets.cs b/src/libraries/System.IO.FileSystem/tests/FileStream/DevicesPipesAndSockets.cs index ede852c7305b3f..f5b532e6ce47d7 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileStream/DevicesPipesAndSockets.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileStream/DevicesPipesAndSockets.cs @@ -63,6 +63,7 @@ public async Task CharacterDevice_WriteAllTextAsync(string devicePath) [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public async Task NamedPipe_ReadWrite() { string fifoPath = GetTestFilePath(); @@ -83,6 +84,7 @@ await Task.WhenAll( [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public async Task NamedPipe_ReadWrite_Async() { string fifoPath = GetTestFilePath(); diff --git a/src/libraries/System.IO.FileSystem/tests/Path/Exists_File.cs b/src/libraries/System.IO.FileSystem/tests/Path/Exists_File.cs index 64af8e84c009d2..652d348b5c3f3e 100644 --- a/src/libraries/System.IO.FileSystem/tests/Path/Exists_File.cs +++ b/src/libraries/System.IO.FileSystem/tests/Path/Exists_File.cs @@ -22,6 +22,7 @@ public void PathAlreadyExistsAsDirectory() [Fact] [PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Browser)] // Uses P/Invokes + [ActiveIssue("https://github.com/dotnet/runtime/issues/67853", TestPlatforms.tvOS)] public void TrueForNonRegularFile() { string fileName = GetTestFilePath(); diff --git a/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs b/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs index b7fbaec38f14f9..3d44a1a22ce040 100644 --- a/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs +++ b/src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs @@ -1114,26 +1114,36 @@ private void TestMultiplication() where T : struct, INumber } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarByte() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarSByte() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarUInt16() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarInt16() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarUInt32() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarInt32() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarUInt64() { TestMultiplicationWithScalar(); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarInt64() { TestMultiplicationWithScalar(); } [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/60347", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsX86Process))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarSingle() { TestMultiplicationWithScalar(); } [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/60347", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsX86Process))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)] public void MultiplicationWithScalarDouble() { TestMultiplicationWithScalar(); } private void TestMultiplicationWithScalar() where T : struct, INumber { diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index 5da9a665485658..eb16796c6869a5 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -3248,44 +3248,47 @@ init_io_stream_slots (void) io_stream_slots_set = TRUE; } -MonoBoolean -ves_icall_System_IO_Stream_HasOverriddenBeginEndRead (MonoObjectHandle stream, MonoError *error) + +static MonoBoolean +stream_has_overriden_begin_or_end_method (MonoObjectHandle stream, int begin_slot, int end_slot, MonoError *error) { MonoClass* curr_klass = MONO_HANDLE_GET_CLASS (stream); MonoClass* base_klass = mono_class_try_get_stream_class (); - if (!io_stream_slots_set) - init_io_stream_slots (); + mono_class_setup_vtable (curr_klass); + if (mono_class_has_failure (curr_klass)) { + mono_error_set_for_class_failure (error, curr_klass); + return_val_if_nok (error, FALSE); + } // slots can still be -1 and it means Linker removed the methods from the base class (Stream) // in this case we can safely assume the methods are not overridden // otherwise - check vtable MonoMethod **curr_klass_vtable = m_class_get_vtable (curr_klass); - gboolean begin_read_is_overriden = io_stream_begin_read_slot != -1 && curr_klass_vtable [io_stream_begin_read_slot]->klass != base_klass; - gboolean end_read_is_overriden = io_stream_end_read_slot != -1 && curr_klass_vtable [io_stream_end_read_slot]->klass != base_klass; + gboolean begin_is_overriden = begin_slot != -1 && curr_klass_vtable [begin_slot] != NULL && curr_klass_vtable [begin_slot]->klass != base_klass; + gboolean end_is_overriden = end_slot != -1 && curr_klass_vtable [end_slot] != NULL && curr_klass_vtable [end_slot]->klass != base_klass; + + return begin_is_overriden || end_is_overriden; +} + +MonoBoolean +ves_icall_System_IO_Stream_HasOverriddenBeginEndRead (MonoObjectHandle stream, MonoError *error) +{ + if (!io_stream_slots_set) + init_io_stream_slots (); // return true if BeginRead or EndRead were overriden - return begin_read_is_overriden || end_read_is_overriden; + return stream_has_overriden_begin_or_end_method (stream, io_stream_begin_read_slot, io_stream_end_read_slot, error); } MonoBoolean ves_icall_System_IO_Stream_HasOverriddenBeginEndWrite (MonoObjectHandle stream, MonoError *error) { - MonoClass* curr_klass = MONO_HANDLE_GETVAL (stream, vtable)->klass; - MonoClass* base_klass = mono_class_try_get_stream_class (); - if (!io_stream_slots_set) init_io_stream_slots (); - // slots can still be -1 and it means Linker removed the methods from the base class (Stream) - // in this case we can safely assume the methods are not overridden - // otherwise - check vtable - MonoMethod **curr_klass_vtable = m_class_get_vtable (curr_klass); - gboolean begin_write_is_overriden = io_stream_begin_write_slot != -1 && curr_klass_vtable [io_stream_begin_write_slot]->klass != base_klass; - gboolean end_write_is_overriden = io_stream_end_write_slot != -1 && curr_klass_vtable [io_stream_end_write_slot]->klass != base_klass; - // return true if BeginWrite or EndWrite were overriden - return begin_write_is_overriden || end_write_is_overriden; + return stream_has_overriden_begin_or_end_method (stream, io_stream_begin_write_slot, io_stream_end_write_slot, error); } MonoBoolean diff --git a/src/tests/FunctionalTests/Android/Device_Emulator/AOT_System.IO.Stream/Android.Device_Emulator.Aot_System.IO.Stream.Test.csproj b/src/tests/FunctionalTests/Android/Device_Emulator/AOT_System.IO.Stream/Android.Device_Emulator.Aot_System.IO.Stream.Test.csproj new file mode 100644 index 00000000000000..c8d2f37c34880d --- /dev/null +++ b/src/tests/FunctionalTests/Android/Device_Emulator/AOT_System.IO.Stream/Android.Device_Emulator.Aot_System.IO.Stream.Test.csproj @@ -0,0 +1,16 @@ + + + Exe + true + false + true + $(NetCoreAppCurrent) + Android.Device_Emulator.Aot_System.IO.Stream.Test.dll + 42 + true + + + + + + diff --git a/src/tests/FunctionalTests/Android/Device_Emulator/AOT_System.IO.Stream/Program.cs b/src/tests/FunctionalTests/Android/Device_Emulator/AOT_System.IO.Stream/Program.cs new file mode 100644 index 00000000000000..29215aeb777147 --- /dev/null +++ b/src/tests/FunctionalTests/Android/Device_Emulator/AOT_System.IO.Stream/Program.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System; +using System.IO; + +// https://github.com/dotnet/runtime/issues/67402 + +public static class Program +{ + public static int Main(string[] args) + { + var stream = new DummyStream(); + var buffer = new byte[stream.Length]; + int read = stream.ReadAsync(buffer, 0, buffer.Length).GetAwaiter().GetResult(); + return read + buffer[0]; + } + + private sealed class DummyStream : System.IO.Stream + { + protected override void Dispose (bool disposing) => throw new NotImplementedException (); + + public override int Read (byte[] buffer, int offset, int count) + { + buffer[0] = 41; + return 1; + } + + public override long Seek (long offset, SeekOrigin origin) => 0; + public override void SetLength (long value) {} + public override void Write (byte[] buffer, int offset, int count) {} + public override void Flush () {} + + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state) + { + Console.WriteLine("BeginRead"); + return base.BeginRead(buffer, offset, count, callback, state); + } + + public override bool CanRead => true; + public override bool CanSeek => false; + public override bool CanWrite => false; + + public override long Length => 1; + public override long Position { get; set; } = 0; + } +}