Disable failing EventLogSession.GetProviderNames test (#64780)
authorSven Boemer <sbomer@gmail.com>
Thu, 24 Feb 2022 22:58:58 +0000 (14:58 -0800)
committerGitHub <noreply@github.com>
Thu, 24 Feb 2022 22:58:58 +0000 (14:58 -0800)
* Disable failing EventLogSession.GetProviderNames test

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs
src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
src/libraries/System.Diagnostics.EventLog/tests/System/Diagnostics/Reader/ProviderMetadataTests.cs

index dee1cb8..3becce5 100644 (file)
@@ -242,6 +242,8 @@ namespace System
 
         public static bool CanRunImpersonatedTests => PlatformDetection.IsNotWindowsNanoServer && PlatformDetection.IsWindowsAndElevated;
 
+        public static bool IsWindowsX86OrX64 => PlatformDetection.IsWindows && (PlatformDetection.IsX86Process || PlatformDetection.IsX64Process);
+
         private static int s_isWindowsElevated = -1;
         public static bool IsWindowsAndElevated
         {
index e603c16..f348123 100644 (file)
@@ -53,6 +53,7 @@ namespace System
         public static bool IsArmOrArm64Process => IsArmProcess || IsArm64Process;
         public static bool IsNotArmNorArm64Process => !IsArmOrArm64Process;
         public static bool IsArmv6Process => (int)RuntimeInformation.ProcessArchitecture == 7; // Architecture.Armv6
+        public static bool IsX64Process => RuntimeInformation.ProcessArchitecture == Architecture.X64;
         public static bool IsX86Process => RuntimeInformation.ProcessArchitecture == Architecture.X86;
         public static bool IsNotX86Process => !IsX86Process;
         public static bool IsArgIteratorSupported => IsMonoRuntime || (IsWindows && IsNotArmProcess && !IsNativeAot);
index 1a47f63..5258a01 100644 (file)
@@ -1,6 +1,7 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 
+using System;
 using System.Collections.Generic;
 using System.Diagnostics.Eventing.Reader;
 using System.Globalization;
@@ -90,6 +91,7 @@ namespace System.Diagnostics.Tests
         }
 
         [ConditionalFact(typeof(Helpers), nameof(Helpers.SupportsEventLogs))]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/64153", typeof(PlatformDetection), nameof(PlatformDetection.IsWindowsX86OrX64))]
         public void GetProviderNames_AssertProperties()
         {
             const string Prefix = "win:";