wldap32/tests: Skip tests if ldap_init failed (try 3)

Austin English austinenglish at gmail.com
Tue Aug 9 13:14:00 CDT 2011


2011/8/9 André Hentschel <nerv at dawncrow.de>:
> Am 09.08.2011 19:44, schrieb Hans Leidekker:
>> On Tue, 2011-08-09 at 19:31 +0200, André Hentschel wrote:
>>
>>> diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c
>>> index 4cf8564..ed37d88 100644
>>> --- a/dlls/wldap32/tests/parse.c
>>> +++ b/dlls/wldap32/tests/parse.c
>>> @@ -128,7 +128,11 @@ START_TEST (parse)
>>>      LDAP *ld;
>>>
>>>      ld = ldap_initA((char *)"ldap.itd.umich.edu", 389 );
>>> -    ok( ld != NULL, "ldap_init failed\n" );
>>> +    if (!ld)
>>> +    {
>>> +        skip("ldap_init failed, skipping tests\n");
>>> +        return;
>>> +    }
>>>
>>>      test_ldap_parse_sort_control( ld );
>>>      test_ldap_search_extW( ld );
>>
>> If it fails on Wine it's probably because LDAP development files
>> were not present at build time.
>>
>> I'm not sure if we want to hide this failure though, applications
>> may expect ldap_init to succeed.
>>
>
> Wine is supports Solaris and it fails there, so i thought it can't belong to the bad things.

That is a Solaris bug. Putting a skip() would potentially hide bugs on
other platforms where it works (Linux, FreeBSD, OSX).

-- 
-Austin



More information about the wine-devel mailing list