diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ExecutionContextFlowTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ExecutionContextFlowTest.cs index 4a020d921adde..dd4c41fbb1a80 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ExecutionContextFlowTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ExecutionContextFlowTest.cs @@ -335,7 +335,7 @@ public async Task APM_ExecutionContextFlowsAcrossBeginReceiveOperation(bool supp } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Theory] [InlineData(false, 0)] [InlineData(true, 0)] [InlineData(false, 1)] diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs index 5e25f71a0765c..3e2886baf52b7 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs @@ -64,7 +64,7 @@ public void IOControl_FIONREAD_Success() } [PlatformSpecific(TestPlatforms.AnyUnix)] - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/50568", TestPlatforms.Android)] public void IOControl_SIOCATMARK_Unix_Success() { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SelectTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SelectTest.cs index e3187cdc066df..347df8870f1e9 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SelectTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SelectTest.cs @@ -178,7 +178,7 @@ public void Select_Read_OneReadyAtATime(int reads) } [SkipOnPlatform(TestPlatforms.OSX, "typical OSX install has very low max open file descriptors value")] - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/51392", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] public void Select_Error_OneReadyAtATime() { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceiveMisc.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceiveMisc.cs index 2e72e501eb214..0a28ab0a52ee2 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceiveMisc.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceiveMisc.cs @@ -76,7 +76,7 @@ public void SendRecvIovMaxTcp_Success() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] public void SendIovMaxUdp_SuccessOrMessageSize() { // sending more than IOV_MAX segments causes EMSGSIZE on some platforms. @@ -117,7 +117,7 @@ public void SendIovMaxUdp_SuccessOrMessageSize() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] public async Task ReceiveIovMaxUdp_SuccessOrMessageSize() { // receiving more than IOV_MAX segments causes EMSGSIZE on some platforms. @@ -190,7 +190,7 @@ public async Task ReceiveIovMaxUdp_SuccessOrMessageSize() await receiveTask; } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] [SkipOnPlatform(TestPlatforms.Windows, "All data is sent, even when very large (100M).")] public void SocketSendWouldBlock_ReturnsBytesSent() { @@ -219,7 +219,7 @@ public void SocketSendWouldBlock_ReturnsBytesSent() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public async Task Socket_ReceiveFlags_Success() { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs index eccff0d22d630..e6868e4a6fbeb 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -227,7 +227,7 @@ public void MulticastInterface_Set_IPv6_InvalidIndex_Throws() } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // In WSL, the connect() call fails immediately. + [Theory] [InlineData(false)] [InlineData(true)] [SkipOnPlatform(TestPlatforms.FreeBSD, "on FreeBSD Connect may or may not fail immediately based on timing.")] @@ -367,7 +367,7 @@ public void ReuseAddress_Windows(bool? exclusiveAddressUse, bool? firstSocketReu ReuseAddress(exclusiveAddressUse, firstSocketReuseAddress, secondSocketReuseAddress, expectFailure); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] // Windows defaults are different public void ExclusiveAddress_Default_Unix() { @@ -379,7 +379,7 @@ public void ExclusiveAddress_Default_Unix() } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Theory] [InlineData(1)] [InlineData(0)] [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix does not have separate options for ExclusiveAddressUse and ReuseAddress. @@ -403,7 +403,7 @@ public void SettingExclusiveAddress_SetsReuseAddress(int value) } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] public void ExclusiveAddressUseTcp() { using (Socket a = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) @@ -547,7 +547,7 @@ public void GetSetRawSocketOption_Roundtrips(AddressFamily family) } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/52124", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] public void Get_AcceptConnection_Succeeds() { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs index 3223a64dd076d..6f02308d73f4d 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs @@ -283,7 +283,7 @@ public void ExclusiveAddressUse_NullClient() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] public void Roundtrip_ExclusiveAddressUse_GetEqualsSet_True() { using (TcpClient client = new TcpClient()) @@ -293,7 +293,7 @@ public void Roundtrip_ExclusiveAddressUse_GetEqualsSet_True() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] public void Roundtrip_ExclusiveAddressUse_GetEqualsSet_False() { using (TcpClient client = new TcpClient()) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpListenerTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpListenerTest.cs index b23ad8cd0759c..9415b4961a251 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpListenerTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpListenerTest.cs @@ -22,7 +22,7 @@ public void Ctor_InvalidArguments_Throws() AssertExtensions.Throws("port", () => TcpListener.Create(66000)); } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Theory] [InlineData(0)] [InlineData(1)] [InlineData(2)] diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs index 1137613a062c1..3b4479629507b 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs @@ -283,7 +283,7 @@ public void MulticastLoopback_Roundtrips() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/18258")] + [Fact] public void EnableBroadcast_Roundtrips() { using (var udpClient = new UdpClient())