Commit e3b00de3 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

advapi32/tests: Use win_skip() to skip over unimplemented functionality.

parent 737c64d2
......@@ -351,7 +351,7 @@ START_TEST(cred)
if (!pCredEnumerateA || !pCredFree || !pCredWriteA || !pCredDeleteA ||
!pCredReadA)
{
skip("credentials functions not present in advapi32.dll\n");
win_skip("credentials functions not present in advapi32.dll\n");
return;
}
......
......@@ -331,7 +331,7 @@ static void test_incorrect_api_usage(void)
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError());
}
else
skip("CryptSignHashW is not available\n");
win_skip("CryptSignHashW is not available\n");
result = pCryptSetKeyParam(hKey, 0, &temp, 1);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
......@@ -349,7 +349,7 @@ static void test_incorrect_api_usage(void)
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError());
}
else
skip("CryptVerifySignatureW is not available\n");
win_skip("CryptVerifySignatureW is not available\n");
result = pCryptDestroyHash(hHash);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
......@@ -394,7 +394,7 @@ static void test_verify_sig(void)
if (!pCryptVerifySignatureW)
{
skip("CryptVerifySignatureW is not available\n");
win_skip("CryptVerifySignatureW is not available\n");
return;
}
......@@ -402,7 +402,7 @@ static void test_verify_sig(void)
ret = pCryptVerifySignatureW(0, NULL, 0, 0, NULL, 0);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("CryptVerifySignatureW is not implemented\n");
win_skip("CryptVerifySignatureW is not implemented\n");
return;
}
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
......@@ -497,13 +497,13 @@ static void test_enum_providers(void)
if(!pCryptEnumProvidersA)
{
skip("CryptEnumProvidersA is not available\n");
win_skip("CryptEnumProvidersA is not available\n");
return;
}
if (!FindProvRegVals(dwIndex, &dwType, &pszProvName, &cbName, &provCount))
{
skip("Could not find providers in registry\n");
win_skip("Could not find providers in registry\n");
return;
}
......@@ -643,7 +643,7 @@ static void test_enum_provider_types(void)
if(!pCryptEnumProviderTypesA)
{
skip("CryptEnumProviderTypesA is not available\n");
win_skip("CryptEnumProviderTypesA is not available\n");
return;
}
......@@ -784,7 +784,7 @@ static void test_get_default_provider(void)
if(!pCryptGetDefaultProviderA)
{
skip("CryptGetDefaultProviderA is not available\n");
win_skip("CryptGetDefaultProviderA is not available\n");
return;
}
......@@ -858,7 +858,7 @@ static void test_set_provider_ex(void)
if(!pCryptGetDefaultProviderA || !pCryptSetProviderExA)
{
skip("CryptGetDefaultProviderA and/or CryptSetProviderExA are not available\n");
win_skip("CryptGetDefaultProviderA and/or CryptSetProviderExA are not available\n");
return;
}
......
......@@ -413,7 +413,7 @@ static void test_SystemFunction_encrypt(descrypt func, int num)
if (!func)
{
skip("SystemFunction%03d is not available\n", num);
win_skip("SystemFunction%03d is not available\n", num);
return;
}
......@@ -434,7 +434,7 @@ static void test_SystemFunction_decrypt(descrypt func, int num)
if (!func)
{
skip("SystemFunction%03d is not available\n", num);
win_skip("SystemFunction%03d is not available\n", num);
return;
}
......@@ -460,7 +460,7 @@ static void test_SystemFunction_enc32(descrypt func, int num)
if (!func)
{
skip("SystemFunction%03d is not available\n", num);
win_skip("SystemFunction%03d is not available\n", num);
return;
}
......@@ -482,7 +482,7 @@ static void test_SystemFunction_dec32(descrypt func, int num)
if (!func)
{
skip("SystemFunction%03d is not available\n", num);
win_skip("SystemFunction%03d is not available\n", num);
return;
}
......@@ -504,7 +504,7 @@ static void test_memcmpfunc(memcmpfunc fn)
if (!fn)
{
skip("function is not available\n");
win_skip("function is not available\n");
return;
}
......@@ -549,49 +549,49 @@ START_TEST(crypt_lmhash)
if (pSystemFunction001)
test_SystemFunction001();
else
skip("SystemFunction001 is not available\n");
win_skip("SystemFunction001 is not available\n");
pSystemFunction002 = (fnSystemFunction002)GetProcAddress( module, "SystemFunction002" );
if (pSystemFunction002)
test_SystemFunction002();
else
skip("SystemFunction002 is not available\n");
win_skip("SystemFunction002 is not available\n");
pSystemFunction003 = (fnSystemFunction003)GetProcAddress( module, "SystemFunction003" );
if (pSystemFunction003)
test_SystemFunction003();
else
skip("SystemFunction002 is not available\n");
win_skip("SystemFunction002 is not available\n");
pSystemFunction004 = (fnSystemFunction004)GetProcAddress( module, "SystemFunction004" );
if (pSystemFunction004)
test_SystemFunction004();
else
skip("SystemFunction004 is not available\n");
win_skip("SystemFunction004 is not available\n");
pSystemFunction005 = (fnSystemFunction005)GetProcAddress( module, "SystemFunction005" );
if (pSystemFunction005)
test_SystemFunction005();
else
skip("SystemFunction005 is not available\n");
win_skip("SystemFunction005 is not available\n");
pSystemFunction006 = (fnSystemFunction006)GetProcAddress( module, "SystemFunction006" );
if (pSystemFunction006)
test_SystemFunction006();
else
skip("SystemFunction006 is not available\n");
win_skip("SystemFunction006 is not available\n");
pSystemFunction008 = (fnSystemFunction008)GetProcAddress( module, "SystemFunction008" );
if (pSystemFunction008)
test_SystemFunction008();
else
skip("SystemFunction008 is not available\n");
win_skip("SystemFunction008 is not available\n");
pSystemFunction009 = (fnSystemFunction009)GetProcAddress( module, "SystemFunction009" );
if (pSystemFunction009)
test_SystemFunction009();
else
skip("SystemFunction009 is not available\n");
win_skip("SystemFunction009 is not available\n");
pSystemFunction012 = (descrypt) GetProcAddress( module, "SystemFunction012");
pSystemFunction013 = (descrypt) GetProcAddress( module, "SystemFunction013");
......@@ -645,5 +645,5 @@ START_TEST(crypt_lmhash)
if (pSystemFunction032)
test_SystemFunction032();
else
skip("SystemFunction032 is not available\n");
win_skip("SystemFunction032 is not available\n");
}
......@@ -156,23 +156,23 @@ START_TEST(crypt_md4)
if (pMD4Init && pMD4Update && pMD4Final)
test_md4_ctx();
else
skip("MD4Init and/or MD4Update and/or MD4Final are not available\n");
win_skip("MD4Init and/or MD4Update and/or MD4Final are not available\n");
pSystemFunction007 = (fnSystemFunction007)GetProcAddress( module, "SystemFunction007" );
if (pSystemFunction007)
test_SystemFunction007();
else
skip("SystemFunction007 is not available\n");
win_skip("SystemFunction007 is not available\n");
pSystemFunction010 = (md4hashfunc)GetProcAddress( module, "SystemFunction010" );
if (pSystemFunction010)
test_md4hashfunc(pSystemFunction010);
else
skip("SystemFunction010 is not available\n");
win_skip("SystemFunction010 is not available\n");
pSystemFunction011 = (md4hashfunc)GetProcAddress( module, "SystemFunction011" );
if (pSystemFunction011)
test_md4hashfunc(pSystemFunction011);
else
skip("SystemFunction011 is not available\n");
win_skip("SystemFunction011 is not available\n");
}
......@@ -85,7 +85,7 @@ static void test_md5_ctx(void)
if (!pMD5Init || !pMD5Update || !pMD5Final)
{
skip("Needed functions are not available\n");
win_skip("Needed functions are not available\n");
return;
}
......
......@@ -53,7 +53,7 @@ static void test_sha_ctx(void)
if (!pA_SHAInit || !pA_SHAUpdate || !pA_SHAFinal)
{
skip("A_SHAInit and/or A_SHAUpdate and/or A_SHAFinal are not available\n");
win_skip("A_SHAInit and/or A_SHAUpdate and/or A_SHAFinal are not available\n");
return;
}
......
......@@ -182,7 +182,7 @@ static void test_lsa(void)
START_TEST(lsa)
{
if (!init()) {
skip("Needed functions are not available\n");
win_skip("Needed functions are not available\n");
return;
}
......
......@@ -857,7 +857,7 @@ static void test_AccessCheck(void)
GetProcAddress(NtDllModule, "RtlAdjustPrivilege");
if (!pRtlAdjustPrivilege)
{
skip("missing RtlAdjustPrivilege, skipping test\n");
win_skip("missing RtlAdjustPrivilege, skipping test\n");
return;
}
......@@ -1128,7 +1128,7 @@ static void test_AccessCheck(void)
ok(ret, "AddAccessAllowedAceEx failed with error %d\n", GetLastError());
}
else
skip("AddAccessAllowedAceEx is not available\n");
win_skip("AddAccessAllowedAceEx is not available\n");
ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping,
PrivSet, &PrivSetLen, &Access, &AccessStatus);
......@@ -1190,7 +1190,7 @@ static void test_token_attr(void)
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &Token);
if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{
skip("OpenProcessToken is not implemented\n");
win_skip("OpenProcessToken is not implemented\n");
return;
}
ok(ret, "OpenProcessToken failed with error %d\n", GetLastError());
......@@ -1209,7 +1209,7 @@ static void test_token_attr(void)
if(!pConvertSidToStringSidA)
{
skip("ConvertSidToStringSidA is not available\n");
win_skip("ConvertSidToStringSidA is not available\n");
return;
}
......@@ -1359,7 +1359,7 @@ static void test_CreateWellKnownSid(void)
if (!pCreateWellKnownSid)
{
skip("CreateWellKnownSid not available\n");
win_skip("CreateWellKnownSid not available\n");
return;
}
......@@ -1737,7 +1737,7 @@ static void test_LookupAccountName(void)
ret = LookupAccountNameA(NULL, user_name, NULL, &sid_size, NULL, &domain_size, &sid_use);
if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{
skip("LookupAccountNameA is not implemented\n");
win_skip("LookupAccountNameA is not implemented\n");
return;
}
ok(!ret, "Expected 0, got %d\n", ret);
......@@ -1913,7 +1913,7 @@ static void test_security_descriptor(void)
ret = InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
if (ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("InitializeSecurityDescriptor is not implemented\n");
win_skip("InitializeSecurityDescriptor is not implemented\n");
return;
}
......@@ -2006,7 +2006,7 @@ static void test_process_security(void)
res = InitializeAcl(Acl, 256, ACL_REVISION);
if (!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("ACLs not implemented - skipping tests\n");
win_skip("ACLs not implemented - skipping tests\n");
HeapFree(GetProcessHeap(), 0, Acl);
return;
}
......@@ -2184,14 +2184,14 @@ static void test_impersonation_level(void)
pDuplicateTokenEx = (fnDuplicateTokenEx) GetProcAddress(hmod, "DuplicateTokenEx");
if( !pDuplicateTokenEx ) {
skip("DuplicateTokenEx is not available\n");
win_skip("DuplicateTokenEx is not available\n");
return;
}
SetLastError(0xdeadbeef);
ret = ImpersonateSelf(SecurityAnonymous);
if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{
skip("ImpersonateSelf is not implemented\n");
win_skip("ImpersonateSelf is not implemented\n");
return;
}
ok(ret, "ImpersonateSelf(SecurityAnonymous) failed with error %d\n", GetLastError());
......@@ -2409,7 +2409,7 @@ static void test_GetNamedSecurityInfoA(void)
if (!pGetNamedSecurityInfoA)
{
skip("GetNamedSecurityInfoA is not available\n");
win_skip("GetNamedSecurityInfoA is not available\n");
return;
}
......@@ -2422,7 +2422,7 @@ static void test_GetNamedSecurityInfoA(void)
NULL, NULL, NULL, NULL, &pSecDesc);
if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{
skip("GetNamedSecurityInfoA is not implemented\n");
win_skip("GetNamedSecurityInfoA is not implemented\n");
return;
}
ok(!error, "GetNamedSecurityInfo failed with error %d\n", error);
......@@ -2450,7 +2450,7 @@ static void test_ConvertStringSecurityDescriptor(void)
if (!pConvertStringSecurityDescriptorToSecurityDescriptorA)
{
skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
win_skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
return;
}
......@@ -2601,12 +2601,12 @@ static void test_ConvertSecurityDescriptorToString(void)
if (!pConvertSecurityDescriptorToStringSecurityDescriptorA)
{
skip("ConvertSecurityDescriptorToStringSecurityDescriptor is not available\n");
win_skip("ConvertSecurityDescriptorToStringSecurityDescriptor is not available\n");
return;
}
if (!pCreateWellKnownSid)
{
skip("CreateWellKnownSid is not available\n");
win_skip("CreateWellKnownSid is not available\n");
return;
}
......@@ -2801,7 +2801,7 @@ static void test_PrivateObjectSecurity(void)
if (!pConvertStringSecurityDescriptorToSecurityDescriptorA)
{
skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
win_skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
return;
}
......@@ -2883,7 +2883,7 @@ static void test_acls(void)
ret = InitializeAcl(pAcl, sizeof(ACL) - 1, ACL_REVISION);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("InitializeAcl is not implemented\n");
win_skip("InitializeAcl is not implemented\n");
return;
}
......
......@@ -1829,7 +1829,7 @@ static void test_queryconfig2(void)
if(!pQueryServiceConfig2A)
{
skip("function QueryServiceConfig2A not present\n");
win_skip("function QueryServiceConfig2A not present\n");
return;
}
......@@ -1933,7 +1933,7 @@ static void test_queryconfig2(void)
if(!pChangeServiceConfig2A)
{
skip("function ChangeServiceConfig2A not present\n");
win_skip("function ChangeServiceConfig2A not present\n");
goto cleanup;
}
......@@ -1971,7 +1971,7 @@ static void test_queryconfig2(void)
if(!pQueryServiceConfig2W)
{
skip("function QueryServiceConfig2W not present\n");
win_skip("function QueryServiceConfig2W not present\n");
goto cleanup;
}
SetLastError(0xdeadbeef);
......@@ -2107,7 +2107,7 @@ START_TEST(service)
if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
{
skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
win_skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
return;
}
CloseServiceHandle(scm_handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment