runtime: `System.Diagnostics.Tests.EventLogConfigurationTests.SetProperties_SaveChanges_NotAdmin_Throws` throws wrong exception type
When run from unelevated prompt, the test runs but fails with the wrong type of exception thrown:
System.Diagnostics.Tests.EventLogConfigurationTests.SetProperties_SaveChanges_NotAdmin_Throws [FAIL]
Assert.Throws() Failure
Expected: typeof(System.UnauthorizedAccessException)
Actual: typeof(System.Diagnostics.Eventing.Reader.EventLogException): Unknown error (0x7ffc)
---- System.Diagnostics.Eventing.Reader.EventLogException : Unknown error (0x7ffc)
Stack Trace:
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\src\System\Diagnostics\Reader\EventLogException.cs(47,0): at System.Diagnostics.Eventing.Reader.EventLogException.Throw(Int32 errorCode)
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\src\System\Diagnostics\Reader\NativeWrapper.cs(197,0): at System.Diagnostics.Eventing.Reader.NativeWrapper.EvtSaveChannelConfig(EventLogHandle channelConfig, Int32 flags)
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\src\System\Diagnostics\Reader\EventLogConfiguration.cs(259,0): at System.Diagnostics.Eventing.Reader.EventLogConfiguration.SaveChanges()
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\tests\System\Diagnostics\Reader\EventLogConfigurationTests.cs(118,0): at System.Diagnostics.Tests.EventLogConfigurationTests.<>c__DisplayClass1_0.<SetProperties_SaveChanges_NotAdmin_Throws>b__0()
----- Inner Stack Trace -----
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\src\System\Diagnostics\Reader\EventLogException.cs(47,0): at System.Diagnostics.Eventing.Reader.EventLogException.Throw(Int32 errorCode)
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\src\System\Diagnostics\Reader\NativeWrapper.cs(197,0): at System.Diagnostics.Eventing.Reader.NativeWrapper.EvtSaveChannelConfig(EventLogHandle channelConfig, Int32 flags)
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\src\System\Diagnostics\Reader\EventLogConfiguration.cs(259,0): at System.Diagnostics.Eventing.Reader.EventLogConfiguration.SaveChanges()
C:\Users\gotos\source\repos\runtime\src\libraries\System.Diagnostics.EventLog\tests\System\Diagnostics\Reader\EventLogConfigurationTests.cs(118,0): at System.Diagnostics.Tests.EventLogConfigurationTests.<>c__DisplayClass1_0.<SetProperties_SaveChanges_NotAdmin_Throws>b__0()
Ran on Windows 10 Pro Insiders build (19536), Korean (ko-KR).
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (17 by maintainers)
i can provide this repro to the windows team and can carry on the conversation