Skip to content
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

DOSvc unit test fails with 0x80010123 #465

Closed
pl4nty opened this issue May 14, 2024 · 2 comments
Closed

DOSvc unit test fails with 0x80010123 #465

pl4nty opened this issue May 14, 2024 · 2 comments

Comments

@pl4nty
Copy link

pl4nty commented May 14, 2024

Describe the bug and how to reproduce

I've cloned the repo and targeted net6.0 on Windows 22631.3527, then modified DoSvcTests.cs to import System.Threading.Tasks and return a Task as required by NUnit.

dotnet test UnitTests\PInvoke\DOSvc fails with the following stack trace, running with admin or SYSTEM permissions. Apologies for the screenshot, it's on a VM without copy/paste:

image

What code is involved

UnitTests\PInvoke\DOSvc

Expected behavior

Test passes successfully. I can't find a successful CI run though, so this might be a regression.

@pl4nty
Copy link
Author

pl4nty commented May 19, 2024

Seems like CoSetProxyBlanket doesn't handle auth properly, so we need to initialize manually before IDOManager.

CoInitializeSecurity(
	PSECURITY_DESCRIPTOR.NULL,
	-1,
	[],
	(IntPtr)null,
	Rpc.RPC_C_AUTHN_LEVEL.RPC_C_AUTHN_LEVEL_DEFAULT,
	Rpc.RPC_C_IMP_LEVEL.RPC_C_IMP_LEVEL_IMPERSONATE,
	dwCapabilities: EOLE_AUTHENTICATION_CAPABILITIES.EOAC_STATIC_CLOAKING
);

This starts a download, but the temp file remains empty until timeout. Get-DeliveryOptimizationStatus shows the download has completed though. I suspect an issue with the lock

@dahall
Copy link
Owner

dahall commented May 28, 2024

Fixed test definition and support class

@dahall dahall closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants