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

[Mono] Fix uninitialized vtable bug #67746

Merged
merged 13 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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 })
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -1989,6 +2003,7 @@ public static IEnumerable<object[]> 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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<byte>(), Encoding.UTF8.GetBytes("hello"), Array.Empty<byte>(), Encoding.UTF8.GetBytes("world") };
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/System.IO.FileSystem/tests/Directory/Delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.IO.FileSystem/tests/File/Exists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 10 additions & 0 deletions src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,26 +1114,36 @@ private void TestMultiplication<T>() where T : struct, INumber<T>
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarByte() { TestMultiplicationWithScalar<byte>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarSByte() { TestMultiplicationWithScalar<sbyte>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarUInt16() { TestMultiplicationWithScalar<ushort>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarInt16() { TestMultiplicationWithScalar<short>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarUInt32() { TestMultiplicationWithScalar<uint>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarInt32() { TestMultiplicationWithScalar<int>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarUInt64() { TestMultiplicationWithScalar<ulong>(); }
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67893", TestPlatforms.tvOS)]
public void MultiplicationWithScalarInt64() { TestMultiplicationWithScalar<long>(); }
[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<float>(); }
[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<double>(); }
private void TestMultiplicationWithScalar<T>() where T : struct, INumber<T>
{
Expand Down
Loading