From 53cd78bade5d129460954fef23e567491bde973e Mon Sep 17 00:00:00 2001 From: Brian Robbins Date: Tue, 13 Feb 2018 20:25:55 -0800 Subject: [PATCH] Fix and Enable Most ETW EventSource Tests (dotnet/corefx#27107) Commit migrated from https://github.com/dotnet/corefx/commit/ad52ae103416ea67e30abf21c19d5d0c0cd01b11 --- .../tests/BasicEventSourceTest/FuzzyTests.cs | 5 ++- .../Harness/EventTestHarness.cs | 2 +- .../BasicEventSourceTest/Harness/Listeners.cs | 37 +++++++++++++++++++--- .../tests/BasicEventSourceTest/LoudListener.cs | 5 +++ .../tests/BasicEventSourceTest/TestEventCounter.cs | 3 +- .../tests/BasicEventSourceTest/TestShutdown.cs | 9 ++++-- .../BasicEventSourceTest/TestsManifestNegative.cs | 6 ++-- .../tests/BasicEventSourceTest/TestsUserErrors.cs | 4 +-- .../tests/BasicEventSourceTest/TestsWrite.cs | 9 +++--- .../tests/BasicEventSourceTest/TestsWriteEvent.cs | 30 +++++++++++------- .../TestsWriteEventToListener.cs | 10 +++--- .../tests/Configurations.props | 4 +-- .../tests/CustomEventSources/EventSourceTest.cs | 5 ++- .../tests/System.Diagnostics.Tracing.Tests.csproj | 12 ++++--- src/libraries/dependencies.props | 2 +- 15 files changed, 95 insertions(+), 48 deletions(-) diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/FuzzyTests.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/FuzzyTests.cs index bb586b4..46f2bcc 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/FuzzyTests.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/FuzzyTests.cs @@ -13,7 +13,7 @@ using Microsoft.Diagnostics.Tracing; using System.Diagnostics.Tracing; #endif using Xunit; -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW using Microsoft.Diagnostics.Tracing.Session; #endif @@ -2747,8 +2747,7 @@ namespace BasicEventSourceTests Assert.Equal("FWKFKXHDFY", evt.EventName); })); - // Run tests for ETW -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW using (var listener = new EtwListener()) { EventTestHarness.RunTests(tests, listener, logger); diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EventTestHarness.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EventTestHarness.cs index fc1b1de..70af972 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EventTestHarness.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EventTestHarness.cs @@ -141,7 +141,7 @@ namespace BasicEventSourceTests } catch (Exception e) { - if (e is EventSourceException) + if ((e is EventSourceException) && (e.InnerException != null)) e = e.InnerException; LogWriteLine("Exception thrown: {0}", e.Message); diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/Listeners.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/Listeners.cs index e56fc8b..f1433e0 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/Listeners.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/Listeners.cs @@ -2,8 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW +using Microsoft.Diagnostics.Tracing; using Microsoft.Diagnostics.Tracing.Session; +using Microsoft.Diagnostics.Tracing.Etlx; #endif using System; using System.Collections.Generic; @@ -136,14 +138,14 @@ namespace BasicEventSourceTests { if (i != 0) sb.Append(','); - sb.Append(PayloadString(i, null)); + sb.Append(PayloadString(i, PayloadNames[i])); } sb.Append(')'); return sb.ToString(); } } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /**************************************************************************/ /* Concrete implementation of the Listener abstraction */ @@ -165,7 +167,7 @@ namespace BasicEventSourceTests // Today you have to be Admin to turn on ETW events (anyone can write ETW events). if (TraceEventSession.IsElevated() != true) { - throw new ApplicationException("Need to be elevated to run. "); + throw new Exception("Need to be elevated to run. "); } if (dataFileName == null) @@ -214,6 +216,12 @@ namespace BasicEventSourceTests public override void Dispose() { + if(_disposed) + { + return; + } + + _disposed = true; _session.Flush(); Thread.Sleep(1010); // Let it drain. _session.Dispose(); // This also will kill the real time thread @@ -225,7 +233,6 @@ namespace BasicEventSourceTests Debug.WriteLine("Processing data file " + Path.GetFullPath(_dataFileName)); // Parse all the events as best we can, and also send unhandled events there as well. - traceEventSource.Registered.All += OnEventHelper; traceEventSource.Dynamic.All += OnEventHelper; traceEventSource.UnhandledEvents += OnEventHelper; // Process all the events in the file. @@ -238,12 +245,23 @@ namespace BasicEventSourceTests #region private private void OnEventHelper(TraceEvent data) { + // Ignore EventTrace events. + if (data.ProviderGuid == EventTraceProviderID) + return; + + // Ignore kernel events. + if (data.ProviderGuid == KernelProviderID) + return; + // Ignore manifest events. if ((int)data.ID == 0xFFFE) return; this.OnEvent(new EtwEvent(data)); } + private static readonly Guid EventTraceProviderID = new Guid("9e814aad-3204-11d2-9a82-006008a86939"); + private static readonly Guid KernelProviderID = new Guid("9e814aad-3204-11d2-9a82-006008a86939"); + /// /// EtwEvent implements the 'Event' abstraction for ETW events (it has a TraceEvent in it) /// @@ -273,6 +291,7 @@ namespace BasicEventSourceTests #endregion } + private bool _disposed; private string _dataFileName; private volatile TraceEventSession _session; #endregion @@ -334,6 +353,12 @@ namespace BasicEventSourceTests public override void Dispose() { + if (_disposed) + { + return; + } + + _disposed = true; EventTestHarness.LogWriteLine("Disposing Listener"); _listener.Dispose(); } @@ -438,5 +463,7 @@ namespace BasicEventSourceTests return _data.Payload[propertyIndex]; } } + + private bool _disposed; } } diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/LoudListener.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/LoudListener.cs index 7f26da5..88801bc 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/LoudListener.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/LoudListener.cs @@ -30,5 +30,10 @@ namespace BasicEventSourceTests Debug.Write(string.Format(" (activity {0}{1}) ", eventData.ActivityId, eventData.RelatedActivityId != null ? "->" + eventData.RelatedActivityId : "")); Debug.WriteLine(string.Format(" ({0}).", eventData.Payload != null ? string.Join(", ", eventData.Payload) : "")); } + + public static EventWrittenEventArgs LastEvent + { + get { return t_lastEvent; } + } } } diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs index 2fccb97..f08b2e6 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs @@ -8,7 +8,7 @@ using Microsoft.Diagnostics.Tracing; #else using System.Diagnostics.Tracing; #endif -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue https://github.com/dotnet/corefx/issues/4864 +#if USE_ETW using Microsoft.Diagnostics.Tracing.Session; #endif using Xunit; @@ -63,6 +63,7 @@ namespace BasicEventSourceTests #if USE_ETW [Fact] + [ActiveIssue("https://github.com/dotnet/corefx/issues/27106")] public void Test_Write_Metric_ETW() { diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestShutdown.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestShutdown.cs index b88408d..d02791f 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestShutdown.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestShutdown.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -13,7 +14,8 @@ using Microsoft.Diagnostics.Tracing; using System.Diagnostics.Tracing; #endif using Xunit; -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW +using Microsoft.Diagnostics.Tracing; using Microsoft.Diagnostics.Tracing.Session; #endif using System.IO; @@ -23,7 +25,9 @@ namespace BasicEventSourceTests { public class TestShutdown { -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. + + // TODO: Depends on desktop APIs (AppDomainSetup and Evidence). +#if USE_ETW && FALSE /// /// Test for manifest event being logged during AD/Process shutdown during EventSource Dispose(bool) method. /// @@ -89,7 +93,6 @@ namespace BasicEventSourceTests }; // Parse all the events as best we can, and also send unhandled events there as well. - traceEventSource.Registered.All += onEvent; traceEventSource.Dynamic.All += onEvent; traceEventSource.UnhandledEvent += onEvent; traceEventSource.Process(); diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs index 922168d..a23f456 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs @@ -104,9 +104,9 @@ namespace BasicEventSourceTests () => EventSource.GenerateManifest(typeof(Sdt.TooManyChannelsEventSource), string.Empty)); #endif -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. - e = AssertExtensions.Throws(GetResourceString("EventSource_EventWithAdminChannelMustHaveMessage", "WriteInteger", "Admin"), - () => EventSource.GenerateManifest(typeof(Sdt.EventWithAdminChannelNoMessageEventSource), string.Empty, strictOptions)); +#if USE_ETW + e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.EventWithAdminChannelNoMessageEventSource), string.Empty, strictOptions)); + AsserExceptionStringsEqual(() => GetResourceString("EventSource_EventWithAdminChannelMustHaveMessage", "WriteInteger", "Admin"), e); #endif // USE_ETW e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.ReservedOpcodeEventSource), string.Empty, strictOptions)); diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs index 046b5e4..d260526 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs @@ -74,7 +74,7 @@ namespace BasicEventSourceTests [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Depends on inspecting IL at runtime.")] public void Test_BadEventSource_MismatchedIds() { -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW // We expect only one session to be on when running the test but if a ETW session was left // hanging, it will confuse the EventListener tests. EtwListener.EnsureStopped(); @@ -86,7 +86,7 @@ namespace BasicEventSourceTests var listenerGenerators = new Func[] { () => new EventListenerListener(), -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW () => new EtwListener() #endif // USE_ETW }; diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.cs index 5743bbe..ccd0305 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.cs @@ -13,7 +13,7 @@ using Microsoft.Diagnostics.Tracing; using System.Diagnostics.Tracing; #endif using Xunit; -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW using Microsoft.Diagnostics.Tracing.Session; #endif using System.Diagnostics; @@ -63,7 +63,7 @@ namespace BasicEventSourceTests Test_Write_T(new EventListenerListener(true)); } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /// /// Tests the EventSource.Write[T] method (can only use the self-describing mechanism). /// Tests the ETW code path @@ -414,18 +414,19 @@ namespace BasicEventSourceTests /// [Fact] [ActiveIssue("dotnet/corefx #18806", TargetFrameworkMonikers.NetFramework)] + [ActiveIssue("https://github.com/dotnet/corefx/issues/27106")] public void Test_Write_T_In_Manifest_Serialization() { using (var eventListener = new EventListenerListener()) { -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW using (var etwListener = new EtwListener()) #endif { var listenerGenerators = new Func[] { () => eventListener, -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW () => etwListener #endif // USE_ETW }; diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEvent.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEvent.cs index 080f6d7..f03e1a4 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEvent.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEvent.cs @@ -24,7 +24,7 @@ namespace BasicEventSourceTests { public class TestsWriteEvent { -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /// /// Tests WriteEvent using the manifest based mechanism. /// Tests the ETW path. @@ -62,7 +62,7 @@ namespace BasicEventSourceTests { Test_WriteEvent(new EventListenerListener(true), false); } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /// /// Tests WriteEvent using the self-describing mechanism. /// Tests both the ETW and TraceListener paths. @@ -156,7 +156,7 @@ namespace BasicEventSourceTests Assert.Equal(evt.PayloadValue(0, "arg1"), "one"); Assert.Equal(evt.PayloadValue(1, "arg2"), "two"); })); -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /*************************************************************************/ tests.Add(new SubTest("Write/Basic/EventWithManyTypeArgs", delegate () @@ -200,7 +200,7 @@ namespace BasicEventSourceTests Assert.Equal("s0", (string)evt.PayloadValue(0, "s0")); Assert.Equal("s8", (string)evt.PayloadValue(8, "s8")); })); -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /*************************************************************************/ tests.Add(new SubTest("Write/Activity/EventWithXferWeirdArgs", delegate () @@ -221,7 +221,7 @@ namespace BasicEventSourceTests Assert.Equal("128", evt.PayloadValue(0, "iptr").ToString()); Assert.Equal(true, (bool)evt.PayloadValue(1, "b")); - Assert.Equal((long)SdtEventSources.MyLongEnum.LongVal1, (long)evt.PayloadValue(2, "le")); + Assert.Equal((long)SdtEventSources.MyLongEnum.LongVal1, ((IConvertible)evt.PayloadValue(2, "le")).ToInt64(null)); })); #endif // USE_ETW /*************************************************************************/ @@ -239,7 +239,7 @@ namespace BasicEventSourceTests Assert.Equal(logger.Name, evt.ProviderName); Assert.Equal("EventEnum", evt.EventName); - Assert.Equal(1, (int)evt.PayloadValue(0, "x")); + Assert.Equal(1, ((IConvertible)evt.PayloadValue(0, "x")).ToInt32(null)); if (evt.IsEtw && !useSelfDescribingEvents) Assert.Equal("Blue", evt.PayloadString(0, "x")); })); @@ -254,7 +254,7 @@ namespace BasicEventSourceTests Assert.Equal(logger.Name, evt.ProviderName); Assert.Equal("EventEnum1", evt.EventName); - Assert.Equal(1, (int)evt.PayloadValue(0, "x")); + Assert.Equal(1, ((IConvertible)evt.PayloadValue(0, "x")).ToInt32(null)); if (evt.IsEtw && !useSelfDescribingEvents) Assert.Equal("Blue", evt.PayloadString(0, "x")); })); @@ -363,7 +363,12 @@ namespace BasicEventSourceTests Assert.Equal("", evt.PayloadValue(2, null)); })); - if (useSelfDescribingEvents) + // Self-describing ETW does not support NULL arguments. + if (useSelfDescribingEvents +#if USE_ETW + && !(listener is EtwListener) +#endif // USE_ETW + ) { tests.Add(new SubTest("WriteEvent/Basic/EventVarArgsWithString", delegate () { logger.EventVarArgsWithString(1, 2, 12, null); }, @@ -430,7 +435,7 @@ namespace BasicEventSourceTests } } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /// /// Tests sending complex data (class, arrays etc) from WriteEvent /// Tests the EventListener case @@ -519,7 +524,7 @@ namespace BasicEventSourceTests Test_WriteEvent_ByteArray(false, new EventListenerListener(true)); } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /// /// Tests sending complex data (class, arrays etc) from WriteEvent /// Uses Manifest format @@ -549,7 +554,7 @@ namespace BasicEventSourceTests } } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW /// /// Tests sending complex data (class, arrays etc) from WriteEvent /// Uses Self-Describing format @@ -647,6 +652,8 @@ namespace BasicEventSourceTests Assert.Equal(1000, (long)evt.PayloadValue(1, "lng")); })); + /* TODO: NULL byte array does not seem to be supported. + * An EventSourceMessage event is written for this case. tests.Add(new SubTest("Write/Array/EventWithNullByteArray", delegate () { @@ -664,6 +671,7 @@ namespace BasicEventSourceTests Assert.Equal(0, (int)evt.PayloadValue(1, "n")); } })); + */ tests.Add(new SubTest("Write/Array/EventWithEmptyByteArray", delegate () diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEventToListener.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEventToListener.cs index 4cbc1c2..bdb11d9 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEventToListener.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEventToListener.cs @@ -150,7 +150,7 @@ namespace BasicEventSourceTests Assert.Equal(MyFlags.Flag1, (MyFlags)LoudListener.t_lastEvent.Payload[0]); #endregion -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW #region Validate DateTime DateTime now = DateTime.Now; log.EventDateTime(now); @@ -178,7 +178,7 @@ namespace BasicEventSourceTests EventSource.SendCommand(log, EventCommand.SendManifest, options); Guid guid = Guid.NewGuid(); -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW log.EventWithManyTypeArgs("Hello", 0, 0, 0, 'a', 0, 0, 0, 0, (float)10.0, (double)11.0, guid); Assert.Equal(25, LoudListener.LastEvent.EventId); Assert.Equal(12, LoudListener.LastEvent.Payload.Count); @@ -206,7 +206,7 @@ namespace BasicEventSourceTests Assert.Equal(9, LoudListener.t_lastEvent.Payload.Count); Assert.Equal("s0", (string)LoudListener.t_lastEvent.Payload[0]); Assert.Equal("s8", (string)LoudListener.t_lastEvent.Payload[8]); -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW log.EventWithWeirdArgs(IntPtr.Zero, true, MyLongEnum.LongVal1 /*, 9999999999999999999999999999m*/); Assert.Equal(30, LoudListener.LastEvent.EventId); Assert.Equal(3 /*4*/, LoudListener.LastEvent.Payload.Count); @@ -255,14 +255,14 @@ namespace BasicEventSourceTests TestUtilities.CheckNoEventSourcesRunning("Stop"); } -#if USE_ETW // TODO: Enable when TraceEvent is available on CoreCLR. GitHub issue #4864. +#if USE_ETW [Fact] public void Test_WriteEvent_TransferEvents() { TestUtilities.CheckNoEventSourcesRunning("Start"); using (var log = new EventSourceTest()) { - using (var el = new LoudListener()) + using (var el = new LoudListener(log)) { Guid actid = Guid.NewGuid(); log.LogTaskScheduled(actid, "Hello from a test"); diff --git a/src/libraries/System.Diagnostics.Tracing/tests/Configurations.props b/src/libraries/System.Diagnostics.Tracing/tests/Configurations.props index 8b803e0..1040c9b 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/Configurations.props +++ b/src/libraries/System.Diagnostics.Tracing/tests/Configurations.props @@ -2,8 +2,8 @@ - netcoreapp; - netstandard; + netcoreapp-Windows_NT; + netcoreapp-Unix; \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.Tracing/tests/CustomEventSources/EventSourceTest.cs b/src/libraries/System.Diagnostics.Tracing/tests/CustomEventSources/EventSourceTest.cs index 6261ab7..725a8d8 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/CustomEventSources/EventSourceTest.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/CustomEventSources/EventSourceTest.cs @@ -137,13 +137,12 @@ namespace SdtEventSources public void EventDateTime(DateTime dt) { WriteEvent(24, dt); } [Event(25, Keywords = Keywords.HasNoArgs, Level = EventLevel.Informational)] - public void EventWithManyTypeArgs(string msg, long l, uint ui, UInt64 ui64, + public void EventWithManyTypeArgs(string msg, long l, uint ui, UInt64 ui64, char c, byte b, sbyte sb, short sh, ushort ush, float f, double d, Guid guid) { if (IsEnabled(EventLevel.Informational, Keywords.HasNoArgs)) - // 4.5 EventSource does not support "Char" type - WriteEvent(25, msg, l, ui, ui64, b, sb, sh, ush, f, d, guid); + WriteEvent(25, msg, l, ui, ui64, c, b, sb, sh, ush, f, d, guid); } [Event(26)] diff --git a/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj b/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj index 5974d34..a91cb64 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj +++ b/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj @@ -5,12 +5,13 @@ {7E0E1B11-FF70-461E-99F7-C0AF252C0C60} $(DefineConstants);FEATURE_ETLEVENTS $(DefineConstants);FEATURE_EVENTCOUNTER_DISPOSE + $(DefineConstants);USE_ETW true - - - - + + + + @@ -39,6 +40,9 @@ + + + diff --git a/src/libraries/dependencies.props b/src/libraries/dependencies.props index 6c334c7..c981df6 100644 --- a/src/libraries/dependencies.props +++ b/src/libraries/dependencies.props @@ -47,7 +47,7 @@ 1.0.3-prerelease-00921-01 1.0.0-beta-build0015 - 1.0.3-alpha-experimental + 2.0.4 2.1.0-preview2-02513-01 -- 2.7.4