Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=55555
-- v2: secur32/tests: Skip the tests instead of crashing if Kerberos is not supported.
From: Francois Gouget fgouget@codeweavers.com
This avoids a crash when Wine is compiled using --without-krb5. This makes test_ticket_cache() more consistent with test_kerberos(). --- Compiling Wine using --without-krb5 was meant to mimick the situation on macOS (see bug 55555). But the latter gets failures, not a crash, so it's not an exact match. --- dlls/secur32/tests/secur32.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/secur32/tests/secur32.c b/dlls/secur32/tests/secur32.c index b1a1db76c3e..dd6eea095bf 100644 --- a/dlls/secur32/tests/secur32.c +++ b/dlls/secur32/tests/secur32.c @@ -446,7 +446,7 @@ static void test_kerberos(void)
status = QuerySecurityPackageInfoA(provider, &info); - ok(status == SEC_E_OK, "Kerberos package not installed, skipping test\n"); + ok(status == SEC_E_OK, "Kerberos package not installed (%08lx), skipping test\n", status); if(status != SEC_E_OK) return;
@@ -479,7 +479,12 @@ static void test_ticket_cache(void)
RtlInitAnsiString( &name, MICROSOFT_KERBEROS_NAME_A ); status = LsaLookupAuthenticationPackage( lsa, &name, &package ); - ok( !status, "got %08lx\n", status ); + ok(status == SEC_E_OK, "Kerberos package not installed (%08lx), skipping test\n", status); + if(status != SEC_E_OK) + { + LsaDeregisterLogonProcess( lsa ); + return; + }
status = LsaCallAuthenticationPackage( lsa, package, &req, sizeof(req), (void **)&resp, &len, &status ); ok( !status, "got %08lx\n", status );
v3: Make test_ticket_cache() fail and skip the tests the same way as test_kerberos(). Trace the error leading to the skip in both cases.
This merge request was approved by Hans Leidekker.