dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.31k stars 4.74k forks source link

Test: System.ServiceProcess.Tests.SafeServiceControllerTests/GetServices failed with "Xunit.Sdk.TrueException" #21463

Open ghost opened 7 years ago

ghost commented 7 years ago

Opened on behalf of @Jiayili1

The test System.ServiceProcess.Tests.SafeServiceControllerTests/GetServices has failed.

KeyIso.CanStop\r Expected: True\r Actual: False

    Stack Trace:

       at System.ServiceProcess.Tests.SafeServiceControllerTests.GetServices()

Build : Master - 20170502.01 (Core Tests) Failing configurations:

Detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20170502.01/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

KristinXie1 commented 7 years ago

Closed Issue: https://github.com/dotnet/corefx/issues/14554

danmoseley commented 7 years ago

Something special about this service on Nano maybe?

danmoseley commented 7 years ago

need to try the test manually on Nano

danmoseley commented 7 years ago

Presumably manipulating services maybe a relatively important scenario for code running on a headless server.

danmoseley commented 7 years ago

On Nano,

[10.159.67.181]: PS C:\dotnet\foo\1> ..\dotnet run
false False (string.IsNullOrEmpty(KeyIso.DisplayName))
true False (KeyIso.CanStop)
false False (KeyIso.CanPauseAndContinue)
false False (KeyIso.CanShutdown)
equal Win32ShareProcess == Win32ShareProcess
equal Manual == Manual
false False (string.IsNullOrEmpty(SamSs.DisplayName))
false False (SamSs.CanStop)
false False (SamSs.CanPauseAndContinue)
false False (SamSs.CanShutdown)
equal Win32ShareProcess == Win32ShareProcess
equal Automatic == Automatic
true True (foundKeyIsoSvc)
true True (foundSamSvc)
true True (foundOtherSvc)

On regular Windows, KeyIso.CanStop is true. maybe just need to pick a different service that works for evyerone.

KristinXie1 commented 7 years ago

This test is still failed on Core Tests in build 20170510.01, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20170510.01/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

danmoseley commented 7 years ago

Test issue only, moving to future.

danmoseley commented 7 years ago
2017-05-10 01:36:55,516: INFO: proc(54): run_and_log_output: Output:    System.ServiceProcess.Tests.SafeServiceControllerTests.GetServices [FAIL]
2017-05-10 01:36:55,516: INFO: proc(54): run_and_log_output: Output:       Assert.Equal() Failure
2017-05-10 01:36:55,516: INFO: proc(54): run_and_log_output: Output:       Expected: False
2017-05-10 01:36:55,516: INFO: proc(54): run_and_log_output: Output:       Actual:   True
2017-05-10 01:36:55,532: INFO: proc(54): run_and_log_output: Output:       Stack Trace:
2017-05-10 01:36:55,641: INFO: proc(54): run_and_log_output: Output:             at System.ServiceProcess.Tests.SafeServiceControllerTests.GetServices()
2017-05-10 01:36:57,526: INFO: proc(54): run_and_log_output: Output: Finished:    System.ServiceProcess.ServiceController.Tests
danmoseley commented 7 years ago

We really need line numbers...!

Priya91 commented 7 years ago

@danmosemsft Is Windows Nano runs being tracked for 2.0? This is most likely a test issue as noted above, why is the milestone changed? Should we disable this test for Nano

danmoseley commented 7 years ago

@Priya91 you're right we should ideally fix or disable this test for Nano in both 2.0 and master. I will do it.

KristinXie1 commented 7 years ago

This issue is still repro on build 20170522.01, detail: https://mc.dot.net/#/product/netcore/200/source/official~2Fcorefx~2Frelease~2F2.0.0~2F/type/test~2Ffunctional~2Fportable~2Fcli~2F/build/20170522.01/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

KristinXie1 commented 7 years ago

This issue is repo in master branch, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20171030.01/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

stephentoub commented 7 years ago

Failed again here: https://mc.dot.net/#/user/dotnet-maestro-bot/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/45a0c3ba3c11462c680ee83e6b3bf6e810449fc4/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

danmoseley commented 6 years ago

Old - closing until it happens again.

danmoseley commented 6 years ago

Disregard, I see we disabled a test.

ahsonkhan commented 6 years ago

From: https://github.com/dotnet/corefx/pull/28906 System.ServiceProcess.Tests.SafeServiceControllerTests/GetServices https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/861be5af2020327c2f421368b14689a9aa30e505/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices Windows.81.Amd64.Open-x64-Debug

Unhandled Exception of Type Xunit.Sdk.EqualException
Message :
Assert.Equal() Failure
Expected: True
Actual:   False
Stack Trace :
   at System.ServiceProcess.Tests.SafeServiceControllerTests.GetServices() in D:\j\workspace\windows-TGrou---74aa877a\src\System.ServiceProcess.ServiceController\tests\SafeServiceControllerTests.cs:line 30
Sunny-pu commented 6 years ago

This issue is repo in master branch, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20180525.01/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

stephentoub commented 6 years ago

Failed again here: https://mc.dot.net/#/user/stephentoub/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/d7d72770327c909cdf639b6392ae97ddd7eff880/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

stephentoub commented 6 years ago

This is failing a bunch now, and not just on Nano, e.g. https://mc.dot.net/#/user/stephentoub/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/1753c55c27a8d352f18f54b6e58556721fdeff0b/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

safern commented 6 years ago

Failed again in: https://mc.dot.net/#/user/safern/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/b159e14d51ed709815536127011096911ac10e8f/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

Message :
Assert.Equal() Failure
Expected: True
Actual:   False
Stack Trace :
   at System.ServiceProcess.Tests.SafeServiceControllerTests.GetServices() in D:\j\workspace\windows-TGrou---74aa877a\src\System.ServiceProcess.ServiceController\tests\SafeServiceControllerTests.cs:line 30

Windows.7.Amd64.Open-x64-Debug

tarekgh commented 6 years ago

and again

https://mc.dot.net/#/user/tarekgh/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Frelease~2F2.1~2F/test~2Ffunctional~2Fcli~2F/725ee07c46c065b61770d8ae1f078e1a7aa02e13/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices

Sunny-pu commented 6 years ago

Failed again: https://mc.dot.net/#/product/netcore/200/source/official~2Fcorefx~2Frelease~2F2.0.0~2F/type/test~2Ffunctional~2Fcli~2F/build/20180727.02/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.SafeServiceControllerTests~2FGetServices