From 769ffceb1b8467e96f37a0f3f5eb58e14b190743 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 2d7139a05803cb..001746fdfe568e 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -15,6 +15,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() @@ -65,8 +68,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() { @@ -123,10 +125,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 466b12b1bdd564c333c50ed9280d05f2f27cf27c 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 001746fdfe568e..531ea6465c63a6 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -16,8 +16,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()