Hi all, I've written a patch which should fix the failing advapi32 cred tests that mirrors the skips in the existing tests:
diff --git a/dlls/advapi32/tests/cred.c b/dlls/advapi32/tests/cred.c index 58103c6..bb6935b 100644 --- a/dlls/advapi32/tests/cred.c +++ b/dlls/advapi32/tests/cred.c @@ -238,7 +238,13 @@ static void test_generic(void) new_cred.UserName = (char *)"winetest";
ret = pCredWriteA(&new_cred, 0); - ok(ret, "CredWriteA failed with error %d\n", GetLastError()); + ok(ret || broken(GetLastError() == ERROR_NO_SUCH_LOGON_SESSION), + "CredWriteA failed with error %d\n", GetLastError()); + if (!ret) + { + skip("couldn't write generic credentials, skipping tests\n"); + return; + }
ret = pCredEnumerateA(NULL, 0, &count, &creds); ok(ret, "CredEnumerateA failed with error %d\n", GetLastError());
I'm wondering whether a better patch would be to change the persist type from CRED_PERSIST_ENTERPRISE to CRED_PERSIST_LOCAL_MACHINE. Rob, this is particularly aimed at you since you wrote the original tests: is there a good reason to use CRED_PERSIST_ENTERPRISE here? --Juan