diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs index cdbb961313ecd..7e514b20f1a19 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs @@ -3,6 +3,7 @@ using Microsoft.Diagnostics.Tracing; using Microsoft.Diagnostics.Tracing.Session; +using Microsoft.DotNet.XUnitExtensions; using System; using System.Collections.Generic; using System.Diagnostics; @@ -39,7 +40,7 @@ public EtwListener(string dataFileName = "EventSourceTestData.etl", string sessi // Today you have to be Admin to turn on ETW events (anyone can write ETW events). if (TraceEventSession.IsElevated() != true) { - throw new Exception("Need to be elevated to run. "); + throw new SkipTestException("Need to be elevated to run. "); } if (dataFileName == null)