Skip to content

Commit 55b04da

Browse files
committedMar 19, 2025·
testldap: If the DSO did not load, skip the test.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1924471 13f79535-47bb-0310-9956-ffa450edef68
1 parent 289e1fb commit 55b04da

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed
 

‎test/testldap.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -1572,17 +1572,24 @@ static void test_ldap_opts(abts_case *tc, void *data)
15721572
apu_err_t err;
15731573
const char *url;
15741574

1575+
apr_status_t status;
1576+
15751577
apr_pool_create(&pool, p);
15761578

15771579
url = apr_psprintf(pool, "ldap://%s:%d", "localhost", APR_LDAP_PORT);
15781580

1579-
apr_ldap_initialise(pool, &ldap, &(err));
1581+
status = apr_ldap_initialise(pool, &ldap, &(err));
1582+
1583+
if (APR_SUCCESS != status) {
1584+
char errbuf[128];
1585+
abts_log_message("apr_ldap_initialise() skipped: %s\n", apr_strerror(status, errbuf, sizeof(errbuf)));
1586+
return;
1587+
}
15801588

15811589
ABTS_TRUE(tc, ldap != NULL);
15821590

15831591
if (ldap) {
15841592

1585-
apr_status_t status;
15861593
apr_ldap_opt_t opt;
15871594

15881595
opt.uri = url;

0 commit comments

Comments
 (0)
Please sign in to comment.