Paul Vriens : crypt32/tests: Skip test if we don't have enough rights.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 13 08:30:38 CDT 2007
Module: wine
Branch: master
Commit: 0653b95017a732dbdb41758b6683ea2bc6bd6c0f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0653b95017a732dbdb41758b6683ea2bc6bd6c0f
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Fri Jul 13 14:27:25 2007 +0200
crypt32/tests: Skip test if we don't have enough rights.
---
dlls/crypt32/tests/sip.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/crypt32/tests/sip.c b/dlls/crypt32/tests/sip.c
index 0496370..5e33655 100644
--- a/dlls/crypt32/tests/sip.c
+++ b/dlls/crypt32/tests/sip.c
@@ -66,9 +66,17 @@ static void test_AddRemoveProvider(void)
/* nonexistent provider should result in a registry error */
SetLastError(0xdeadbeef);
ret = CryptSIPRemoveProvider(&actionid);
- ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n");
- ok (GetLastError() == ERROR_FILE_NOT_FOUND,
- "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
+ if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
+ {
+ /* Apparently the needed rights are checked before the existence of the provider */
+ skip("Need admin rights\n");
+ }
+ else
+ {
+ ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n");
+ ok (GetLastError() == ERROR_FILE_NOT_FOUND,
+ "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
+ }
/* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL
* as allowed */
More information about the wine-cvs
mailing list