RFC: patch to advapi32's cred tests

Juan Lang juan.lang at gmail.com
Fri Feb 13 11:30:14 CST 2009


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



More information about the wine-devel mailing list