James Hawkins : advapi32: Fix a few failing tests in Vista.

Alexandre Julliard julliard at winehq.org
Fri Aug 29 07:29:47 CDT 2008


Module: wine
Branch: master
Commit: 7b8e8004c800fbb0470b59b47eb27d67acd9f86d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7b8e8004c800fbb0470b59b47eb27d67acd9f86d

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Thu Aug 28 21:06:29 2008 -0500

advapi32: Fix a few failing tests in Vista.

---

 dlls/advapi32/tests/cred.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/advapi32/tests/cred.c b/dlls/advapi32/tests/cred.c
index 6d7b758..e96d589 100644
--- a/dlls/advapi32/tests/cred.c
+++ b/dlls/advapi32/tests/cred.c
@@ -97,8 +97,12 @@ static void test_CredWriteA(void)
 
     SetLastError(0xdeadbeef);
     ret = pCredWriteA(&new_cred, 0);
-    ok(!ret && ( GetLastError() == ERROR_BAD_USERNAME || GetLastError() == ERROR_NO_SUCH_LOGON_SESSION /* Vista */ ),
-        "CredWrite with username without domain should return ERROR_BAD_USERNAME or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError());
+    ok(!ret, "CredWrite with username without domain should have failed\n");
+    ok(GetLastError() == ERROR_BAD_USERNAME ||
+       GetLastError() == ERROR_NO_SUCH_LOGON_SESSION || /* Vista */
+       broken(GetLastError() == ERROR_IO_PENDING),
+       "CredWrite with username without domain should return ERROR_BAD_USERNAME"
+       "or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError());
 
     new_cred.UserName = NULL;
     SetLastError(0xdeadbeef);
@@ -175,10 +179,12 @@ static void test_generic(void)
     {
         if (!strcmp(creds[i]->TargetName, TEST_TARGET_NAME))
         {
-            ok(creds[i]->Type == CRED_TYPE_GENERIC, "expected creds[%d]->Type CRED_TYPE_GENERIC but got %d\n", i, creds[i]->Type);
+            ok(creds[i]->Type == CRED_TYPE_GENERIC ||
+               creds[i]->Type == CRED_TYPE_DOMAIN_PASSWORD, /* Vista */
+               "expected creds[%d]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type);
             ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags);
             ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment);
-            check_blob(__LINE__, CRED_TYPE_GENERIC, creds[i]);
+            check_blob(__LINE__, creds[i]->Type, creds[i]);
             ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist);
             ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%d]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName);
             found = TRUE;




More information about the wine-cvs mailing list