Skip to content
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 @@ -60,9 +60,7 @@ public static void PropertyTest2()
Assert.Equal(1, obj.OffsetLow);
}

[Fact]
[ActiveIssue("https://github.com/mono/mono/issues/15311", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/73422", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is32BitProcess))]
public static void PropertyTest3()
{
IAsyncResult asyncResult = new Task(() => Console.WriteLine("this is a dummy task"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ public unsafe void AllocateNativeOverlapped_EmptyArrayAsPinData_DoesNotThrow()

[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix
[ActiveIssue("https://github.com/dotnet/runtime/issues/73421", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public unsafe void AllocateNativeOverlapped_NonBlittableTypeAsPinData_Throws()
{
using (ThreadPoolBoundHandle handle = CreateThreadPoolBoundHandle())
{
AssertExtensions.Throws<ArgumentException>(null, () => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
AssertExtensions.Throws<ArgumentException>(null, () => handle.UnsafeAllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
Assert.Throws<ArgumentException>(() => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
Assert.Throws<ArgumentException>(() => handle.UnsafeAllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
}
}

Expand Down Expand Up @@ -130,7 +129,6 @@ public unsafe void AllocateNativeOverlapped_ObjectArrayAsPinData_DoesNotThrow()

[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix
[ActiveIssue("https://github.com/dotnet/runtime/issues/73421", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public unsafe void AllocateNativeOverlapped_ObjectArrayWithNonBlittableTypeAsPinData_Throws()
{
var array = new object[]
Expand All @@ -141,8 +139,8 @@ public unsafe void AllocateNativeOverlapped_ObjectArrayWithNonBlittableTypeAsPin

using (ThreadPoolBoundHandle handle = CreateThreadPoolBoundHandle())
{
AssertExtensions.Throws<ArgumentException>(null, () => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), array));
AssertExtensions.Throws<ArgumentException>(null, () => handle.UnsafeAllocateNativeOverlapped((_, __, ___) => { }, new object(), array));
Assert.Throws<ArgumentException>(() => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), array));
Assert.Throws<ArgumentException>(() => handle.UnsafeAllocateNativeOverlapped((_, __, ___) => { }, new object(), array));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ public unsafe void PreAllocatedOverlapped_EmptyArrayAsPinData_DoesNotThrow()

[Fact]
[ActiveIssue("https://github.com/mono/mono/issues/15313", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/73421", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public unsafe void PreAllocatedOverlapped_NonBlittableTypeAsPinData_Throws()
{
AssertExtensions.Throws<ArgumentException>(null, () => new PreAllocatedOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
AssertExtensions.Throws<ArgumentException>(null, () => PreAllocatedOverlapped.UnsafeCreate((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
Assert.Throws<ArgumentException>(() => new PreAllocatedOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
Assert.Throws<ArgumentException>(() => PreAllocatedOverlapped.UnsafeCreate((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));

// Make sure the PreAllocatedOverlapped finalizer does the right thing in the case where the .ctor failed.
GC.Collect();
Expand Down Expand Up @@ -76,7 +75,6 @@ public unsafe void PreAllocatedOverlapped_ObjectArrayAsPinData_DoesNotThrow()

[Fact]
[ActiveIssue("https://github.com/mono/mono/issues/15313", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/73421", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public unsafe void PreAllocatedOverlapped_ObjectArrayWithNonBlittableTypeAsPinData_Throws()
{
var array = new object[]
Expand All @@ -85,8 +83,8 @@ public unsafe void PreAllocatedOverlapped_ObjectArrayWithNonBlittableTypeAsPinDa
new byte[5],
};

AssertExtensions.Throws<ArgumentException>(null, () => new PreAllocatedOverlapped((_, __, ___) => { }, new object(), array));
AssertExtensions.Throws<ArgumentException>(null, () => PreAllocatedOverlapped.UnsafeCreate((_, __, ___) => { }, new object(), array));
Assert.Throws<ArgumentException>(() => new PreAllocatedOverlapped((_, __, ___) => { }, new object(), array));
Assert.Throws<ArgumentException>(() => PreAllocatedOverlapped.UnsafeCreate((_, __, ___) => { }, new object(), array));

// Make sure the PreAllocatedOverlapped finalizer does the right thing in the case where the .ctor failed.
GC.Collect();
Expand Down