Disable DNS tests failing on Ubuntu 16.04 and Debian 9 (#56296)
authorKarel Zikmund <karelz@microsoft.com>
Mon, 26 Jul 2021 14:25:19 +0000 (16:25 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Jul 2021 14:25:19 +0000 (16:25 +0200)
Disabled tests tracked by #56295

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs
src/libraries/System.Net.NameResolution/tests/FunctionalTests/GetHostByNameTest.cs
src/libraries/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs

index 0966169..cff5e22 100644 (file)
@@ -20,6 +20,7 @@ namespace System
         public static bool IsDebian => IsDistroAndVersion("debian");
         public static bool IsAlpine => IsDistroAndVersion("alpine");
         public static bool IsDebian8 => IsDistroAndVersion("debian", 8);
+        public static bool IsDebian9 => IsDistroAndVersion("debian", 9);
         public static bool IsDebian10 => IsDistroAndVersion("debian", 10);
         public static bool IsUbuntu1604 => IsDistroAndVersion("ubuntu", 16, 4);
         public static bool IsUbuntu1704 => IsDistroAndVersion("ubuntu", 17, 4);
index 2b62cb6..9c167f0 100644 (file)
@@ -108,11 +108,12 @@ namespace System.Net.NameResolution.Tests
         [ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
         {
-            if (PlatformDetection.IsSLES)
+            if (PlatformDetection.IsSLES || // [ActiveIssue("https://github.com/dotnet/runtime/issues/55271")]
+                PlatformDetection.IsUbuntu1604 || PlatformDetection.IsDebian9) // [ActiveIssue("https://github.com/dotnet/runtime/issues/56295")]
             {
-                // See https://github.com/dotnet/runtime/issues/55271
-                throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
+                throw new SkipTestException("Test environment is not configured for this test to work.");
             }
+
             IPHostEntry entry = Dns.GetHostByName("");
 
             // DNS labels should be compared as case insensitive for ASCII characters. See RFC 4343.
@@ -124,10 +125,10 @@ namespace System.Net.NameResolution.Tests
         [ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public void DnsObsoleteBeginEndGetHostByName_EmptyString_ReturnsHostName()
         {
-            if (PlatformDetection.IsSLES)
+            if (PlatformDetection.IsSLES || // [ActiveIssue("https://github.com/dotnet/runtime/issues/55271")]
+                PlatformDetection.IsUbuntu1604 || PlatformDetection.IsDebian9) // [ActiveIssue("https://github.com/dotnet/runtime/issues/56295")]
             {
-                // See https://github.com/dotnet/runtime/issues/55271
-                throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
+                throw new SkipTestException("Test environment is not configured for this test to work.");
             }
 
             IPHostEntry entry = Dns.EndGetHostByName(Dns.BeginGetHostByName("", null, null));
index bfb8b48..467b8e9 100644 (file)
@@ -30,7 +30,9 @@ namespace System.Net.NameResolution.Tests
             // [ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
             !PlatformDetection.IsiOS && !PlatformDetection.IstvOS && !PlatformDetection.IsMacCatalyst &&
             // [ActiveIssue("https://github.com/dotnet/runtime/issues/55271")]
-            !PlatformDetection.IsSLES;
+            !PlatformDetection.IsSLES &&
+            // [ActiveIssue("https://github.com/dotnet/runtime/issues/56295")]
+            !PlatformDetection.IsUbuntu1604 && !PlatformDetection.IsDebian9;
 
         [ConditionalTheory(nameof(GetHostEntryWorks))]
         [InlineData("")]