-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ServiceController tests fail to start test service #1262
Comments
Looks like this is similar issue to what @danmosemsft mentioned here: #24571 (comment) Same thing happening for me. I poked around at it a bit and found I could get past the access denied error by granting LocalService Read permission on my artifacts folder. Once doing that (and disabling the active issue attribute) I can repro the issue #1724. So it seems to be a permissions issue. Here's the command I used to fix it:
|
An alternative to fixing this would be to run the test services as LocalSystem instead (by passing null for username), which doesn't require special permissions. I'm not fixing this ATM because I haven't looked deeply enough to understand if it's intentional that we test as LocalService. |
@ericstj re localservice -- runtime/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs Lines 179 to 180 in 1d1a5f2
|
The event log is only relevant because the tests are trying to verify Perhaps we could use LocalService for all the other tests, and fail gracefully if needed for the AutoLog tests. Or, just stop testing AutoLog. |
We shouldn't need to see the unconstructed types at runtime for anything. Fixes dotnet#1262.
These tests verify ServiceBase and ServiceController but are rarely run because you need to specify outerloop AND you have to be elevated. They currently are failing for me -- I tried two machines.
This is definitely an elevated prompt. I tried
Debugger.Launch()
in the TestService constructor, and it does not fire. I looked at the Security event log, and it does not have any "failed" messages. "net start " gives access denied as well. So it's not the test harness.@Anipik do you repro this?
The text was updated successfully, but these errors were encountered: