From 597898b5a87546ffc17f6bd4301916e31f24144a Mon Sep 17 00:00:00 2001 From: wfurt Date: Tue, 15 Jul 2025 17:27:09 -0700 Subject: [PATCH 1/2] disable multicast tests on AzureLinux --- .../tests/FunctionalTests/SocketOptionNameTest.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs index 6bb1ec42f58866..248f69d7f3c04f 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -16,6 +16,9 @@ namespace System.Net.Sockets.Tests public partial class SocketOptionNameTest { private static bool SocketsReuseUnicastPortSupport => Capability.SocketsReuseUnicastPortSupport().HasValue; + // Does not work on Nano and Qemu and AzureLinux has firewall enabled by default + private static readonly bool CanRunMulticastTests = !(PlatformDetection.IsNotWindowsNanoNorServerCore || + PlatformDetection.IsAzureLinux || PlatformDetection.IsQemuLinux); [ConditionalFact(nameof(SocketsReuseUnicastPortSupport))] public void ReuseUnicastPort_CreateSocketGetOption() @@ -66,8 +69,7 @@ public void MulticastOption_CreateSocketSetGetOption_GroupAndInterfaceIndex_SetS } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoNorServerCore))] // Skip on Nano: https://github.com/dotnet/runtime/issues/26286 - [ActiveIssue("https://github.com/dotnet/runtime/issues/104547", typeof(PlatformDetection), nameof(PlatformDetection.IsQemuLinux))] + [ConditionalFact(nameof(CanRunMulticastTests))] [ActiveIssue("https://github.com/dotnet/runtime/issues/113827", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile))] public async Task MulticastInterface_Set_AnyInterface_Succeeds() { @@ -124,10 +126,9 @@ public void MulticastInterface_Set_InvalidIndex_Throws() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoNorServerCore))] // Skip on Nano: https://github.com/dotnet/runtime/issues/26286 + [ConditionalFact(nameof(CanRunMulticastTests))] [SkipOnPlatform(TestPlatforms.OSX | TestPlatforms.FreeBSD, "Expected behavior is different on OSX or FreeBSD")] [ActiveIssue("https://github.com/dotnet/runtime/issues/52124", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/104547", typeof(PlatformDetection), nameof(PlatformDetection.IsQemuLinux))] public async Task MulticastInterface_Set_IPv6_AnyInterface_Succeeds() { // On all platforms, index 0 means "any interface" From 6f1988515456e0ea08b39a9f3295afbbf365365c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Mon, 21 Jul 2025 11:06:17 +0200 Subject: [PATCH 2/2] Update src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs --- .../tests/FunctionalTests/SocketOptionNameTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs index 248f69d7f3c04f..9df0b3c398b69a 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -17,8 +17,8 @@ public partial class SocketOptionNameTest { private static bool SocketsReuseUnicastPortSupport => Capability.SocketsReuseUnicastPortSupport().HasValue; // Does not work on Nano and Qemu and AzureLinux has firewall enabled by default - private static readonly bool CanRunMulticastTests = !(PlatformDetection.IsNotWindowsNanoNorServerCore || - PlatformDetection.IsAzureLinux || PlatformDetection.IsQemuLinux); + private static readonly bool CanRunMulticastTests = !(PlatformDetection.IsWindowsNanoServer || PlatformDetection.IsWindowsServerCore || + PlatformDetection.IsAzureLinux || PlatformDetection.IsQemuLinux); [ConditionalFact(nameof(SocketsReuseUnicastPortSupport))] public void ReuseUnicastPort_CreateSocketGetOption()