From 962230064dc371cc32cf6d01bb2bf68d200a81fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Mon, 19 Dec 2011 19:00:30 +0100 Subject: [PATCH] secur32/tests: Fail on missing NTLM. --- dlls/secur32/tests/ntlm.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/dlls/secur32/tests/ntlm.c b/dlls/secur32/tests/ntlm.c index ddc9462eed3..d3cd915a86e 100644 --- a/dlls/secur32/tests/ntlm.c +++ b/dlls/secur32/tests/ntlm.c @@ -578,7 +578,7 @@ static void testInitializeSecurityContextFlags(void) if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info) != SEC_E_OK) { - skip("Package not installed, skipping test!\n"); + ok(0, "NTLM package not installed, skipping test.\n"); return; } @@ -800,7 +800,7 @@ static void testAuth(ULONG data_rep, BOOL fake) if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info)!= SEC_E_OK) { - skip("Package not installed, skipping test.\n"); + ok(0, "NTLM package not installed, skipping test.\n"); return; } @@ -942,7 +942,7 @@ static void testSignSeal(void) */ if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info) != SEC_E_OK) { - skip("Package not installed, skipping test.\n"); + ok(0, "NTLM package not installed, skipping test.\n"); return; } @@ -1192,7 +1192,7 @@ end: HeapFree(GetProcessHeap(), 0, complex_data[3].pvBuffer); } -static void testAcquireCredentialsHandle(void) +static BOOL testAcquireCredentialsHandle(void) { CredHandle cred; TimeStamp ttl; @@ -1206,8 +1206,8 @@ static void testAcquireCredentialsHandle(void) if(pQuerySecurityPackageInfoA(sec_pkg_name, &pkg_info) != SEC_E_OK) { - skip("NTLM package not installed, skipping test\n"); - return; + ok(0, "NTLM package not installed, skipping test\n"); + return FALSE; } pFreeContextBuffer(pkg_info); @@ -1258,6 +1258,7 @@ static void testAcquireCredentialsHandle(void) ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", getSecError(ret)); pFreeCredentialsHandle(&cred); + return TRUE; } static void test_cred_multiple_use(void) @@ -1279,7 +1280,7 @@ static void test_cred_multiple_use(void) if(pQuerySecurityPackageInfoA(sec_pkg_name, &pkg_info) != SEC_E_OK) { - skip("NTLM package not installed, skipping test\n"); + ok(0, "NTLM package not installed, skipping test\n"); return; } buffers[0].cbBuffer = pkg_info->cbMaxToken; @@ -1340,7 +1341,7 @@ static void test_null_auth_data(void) if(pQuerySecurityPackageInfoA((SEC_CHAR *)"NTLM", &info) != SEC_E_OK) { - skip("NTLM package not installed, skipping test\n"); + ok(0, "NTLM package not installed, skipping test\n"); return; } @@ -1383,7 +1384,8 @@ START_TEST(ntlm) pInitializeSecurityContextA && pCompleteAuthToken && pQuerySecurityPackageInfoA) { - testAcquireCredentialsHandle(); + if(!testAcquireCredentialsHandle()) + goto cleanup; testInitializeSecurityContextFlags(); if(pAcceptSecurityContext) { @@ -1402,6 +1404,7 @@ START_TEST(ntlm) else win_skip("Needed functions are not available\n"); +cleanup: if(secdll) FreeLibrary(secdll); }