Skip to content

Commit 6f65d7e

Browse files
committed
testldap: If the DSO did not load, skip the test.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1924467 13f79535-47bb-0310-9956-ffa450edef68
1 parent 56337c3 commit 6f65d7e

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
@@ -1408,17 +1408,24 @@ static void test_ldap_opts(abts_case *tc, void *data)
14081408
apu_err_t err;
14091409
const char *url;
14101410

1411+
apr_status_t status;
1412+
14111413
apr_pool_create(&pool, p);
14121414

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

1415-
apr_ldap_initialise(pool, &ldap, &(err));
1417+
status = apr_ldap_initialise(pool, &ldap, &(err));
1418+
1419+
if (APR_SUCCESS != status) {
1420+
char errbuf[128];
1421+
abts_log_message("apr_ldap_initialise() skipped: %s\n", apr_strerror(status, errbuf, sizeof(errbuf)));
1422+
return;
1423+
}
14161424

14171425
ABTS_TRUE(tc, ldap != NULL);
14181426

14191427
if (ldap) {
14201428

1421-
apr_status_t status;
14221429
apr_ldap_opt_t opt;
14231430

14241431
opt.uri = url;

0 commit comments

Comments
 (0)