svn commit: r1924467 - /apr/apr/trunk/test/testldap.c

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: minfrin
Date: Wed Mar 19 12:47:54 2025
New Revision: 1924467

URL: http://svn.apache.org/viewvc?rev=1924467&view=rev
Log:
testldap: If the DSO did not load, skip the test.

Modified:
    apr/apr/trunk/test/testldap.c

Modified: apr/apr/trunk/test/testldap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testldap.c?rev=1924467&r1=1924466&r2=1924467&view=diff
==============================================================================
--- apr/apr/trunk/test/testldap.c (original)
+++ apr/apr/trunk/test/testldap.c Wed Mar 19 12:47:54 2025
@@ -1408,17 +1408,24 @@ static void test_ldap_opts(abts_case *tc
     apu_err_t err;
     const char *url;
 
+    apr_status_t status;
+
     apr_pool_create(&pool, p);
 
     url = apr_psprintf(pool, "ldap://%s:%d", "localhost", APR_LDAP_PORT);
 
-    apr_ldap_initialise(pool, &ldap, &(err));
+    status = apr_ldap_initialise(pool, &ldap, &(err));
+
+    if (APR_SUCCESS != status) {
+        char errbuf[128];
+        abts_log_message("apr_ldap_initialise() skipped: %s\n", apr_strerror(status, errbuf, sizeof(errbuf)));
+        return;
+    }
 
     ABTS_TRUE(tc, ldap != NULL);
 
     if (ldap) {
 
-        apr_status_t status;
         apr_ldap_opt_t opt;
 
         opt.uri = url;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.