summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/auth-tests.c2
-rw-r--r--src/tests/cmocka/test_dyndns.c18
-rw-r--r--src/tests/cmocka/test_fqnames.c12
-rw-r--r--src/tests/cmocka/test_nss_srv.c2
-rw-r--r--src/tests/cmocka/test_utils.c2
-rw-r--r--src/tests/common_dom.c36
-rw-r--r--src/tests/common_tev.c4
-rw-r--r--src/tests/debug-tests.c4
-rw-r--r--src/tests/files-tests.c12
-rw-r--r--src/tests/krb5_child-test.c44
-rw-r--r--src/tests/resolv-tests.c44
-rw-r--r--src/tests/simple_access-tests.c10
-rw-r--r--src/tests/sysdb-tests.c4
-rw-r--r--src/tests/sysdb_ssh-tests.c2
14 files changed, 98 insertions, 98 deletions
diff --git a/src/tests/auth-tests.c b/src/tests/auth-tests.c
index 02fb39c88..1a93eb110 100644
--- a/src/tests/auth-tests.c
+++ b/src/tests/auth-tests.c
@@ -88,7 +88,7 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx)
talloc_free(test_ctx);
return ENOMEM;
}
- DEBUG(3, ("CONFDB: %s\n", conf_db));
+ DEBUG(3, "CONFDB: %s\n", conf_db);
/* Connect to the conf db */
ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c
index 88e2c0693..9d0e196c8 100644
--- a/src/tests/cmocka/test_dyndns.c
+++ b/src/tests/cmocka/test_dyndns.c
@@ -66,25 +66,25 @@ void __wrap_execv(const char *path, char *const argv[])
switch (dyndns_test_ctx->state) {
case MOCK_NSUPDATE_OK:
- DEBUG(SSSDBG_FUNC_DATA, ("nsupdate success test case\n"));
+ DEBUG(SSSDBG_FUNC_DATA, "nsupdate success test case\n");
err = 0;
break;
case MOCK_NSUPDATE_ERR:
- DEBUG(SSSDBG_FUNC_DATA, ("nsupdate error test case\n"));
+ DEBUG(SSSDBG_FUNC_DATA, "nsupdate error test case\n");
err = 1;
break;
case MOCK_NSUPDATE_TIMEOUT:
- DEBUG(SSSDBG_FUNC_DATA, ("nsupdate timeout test case\n"));
+ DEBUG(SSSDBG_FUNC_DATA, "nsupdate timeout test case\n");
err = 2;
sleep(3);
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("unknown test case\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "unknown test case\n");
err = 255;
break;
}
- DEBUG(SSSDBG_TRACE_LIBS, ("Child exiting with status %d\n", err));
+ DEBUG(SSSDBG_TRACE_LIBS, "Child exiting with status %d\n", err);
_exit(err);
}
@@ -222,7 +222,7 @@ void dyndns_test_ok(void **state)
/* Wait until the test finishes with EOK */
ret = test_ev_loop(dyndns_test_ctx->tctx);
DEBUG(SSSDBG_TRACE_LIBS,
- ("Child request returned [%d]: %s\n", ret, strerror(ret)));
+ "Child request returned [%d]: %s\n", ret, strerror(ret));
assert_int_equal(ret, EOK);
assert_true(WIFEXITED(dyndns_test_ctx->child_status));
@@ -253,7 +253,7 @@ void dyndns_test_error(void **state)
/* Wait until the test finishes with EIO (child error) */
ret = test_ev_loop(dyndns_test_ctx->tctx);
DEBUG(SSSDBG_TRACE_LIBS,
- ("Child request returned [%d]: %s\n", ret, strerror(ret)));
+ "Child request returned [%d]: %s\n", ret, strerror(ret));
assert_int_equal(ret, ERR_DYNDNS_FAILED);
assert_true(WIFEXITED(dyndns_test_ctx->child_status));
@@ -296,7 +296,7 @@ void dyndns_test_timeout(void **state)
tevent_loop_once(dyndns_test_ctx->tctx->ev); /* nsupdate_child_handler */
DEBUG(SSSDBG_TRACE_LIBS,
- ("Child request returned [%d]: %s\n", ret, strerror(ret)));
+ "Child request returned [%d]: %s\n", ret, strerror(ret));
assert_int_equal(ret, ERR_DYNDNS_TIMEOUT);
assert_true(check_leaks_pop(tmp_ctx) == true);
@@ -338,7 +338,7 @@ void dyndns_test_interval(void **state)
/* Wait until the timer hits */
ret = test_ev_loop(dyndns_test_ctx->tctx);
DEBUG(SSSDBG_TRACE_LIBS,
- ("Child request returned [%d]: %s\n", ret, strerror(ret)));
+ "Child request returned [%d]: %s\n", ret, strerror(ret));
assert_int_equal(ret, ERR_OK);
talloc_free(dyndns_test_ctx->update_ctx);
diff --git a/src/tests/cmocka/test_fqnames.c b/src/tests/cmocka/test_fqnames.c
index 90f60c5be..c841858a6 100644
--- a/src/tests/cmocka/test_fqnames.c
+++ b/src/tests/cmocka/test_fqnames.c
@@ -58,7 +58,7 @@ void fqdn_test_teardown(void **state)
struct fqdn_test_ctx);
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
@@ -78,7 +78,7 @@ void test_default(void **state)
char fqdn_s[fqdn_size];
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
@@ -110,7 +110,7 @@ void test_all(void **state)
char fqdn_s[fqdn_size];
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
@@ -142,7 +142,7 @@ void test_flat(void **state)
char fqdn_s[fqdn_size];
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
@@ -174,7 +174,7 @@ void test_flat_fallback(void **state)
char fqdn_s[fqdn_size];
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
@@ -207,7 +207,7 @@ void test_init_nouser(void **state)
errno_t ret;
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c
index 4db108a79..359ae4466 100644
--- a/src/tests/cmocka/test_nss_srv.c
+++ b/src/tests/cmocka/test_nss_srv.c
@@ -78,7 +78,7 @@ mock_nctx(TALLOC_CTX *mem_ctx)
err = sss_idmap_init(sss_idmap_talloc, nctx, sss_idmap_talloc_free,
&nctx->idmap_ctx);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("sss_idmap_init failed.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sss_idmap_init failed.\n");
talloc_free(nctx);
return NULL;
}
diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c
index 13a67f756..30b871791 100644
--- a/src/tests/cmocka/test_utils.c
+++ b/src/tests/cmocka/test_utils.c
@@ -76,7 +76,7 @@ void teardown_dom_list(void **state)
struct dom_list_test_ctx *test_ctx = talloc_get_type(*state,
struct dom_list_test_ctx);
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Type mismatch\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Type mismatch\n");
return;
}
diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c
index 9edb237e7..c0b44456c 100644
--- a/src/tests/common_dom.c
+++ b/src/tests/common_dom.c
@@ -44,20 +44,20 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
test_ctx = create_ev_test_ctx(mem_ctx);
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_zero failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed\n");
goto fail;
}
conf_db = talloc_asprintf(test_ctx, "%s/%s", tests_path, confdb_path);
if (conf_db == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_asprintf failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_asprintf failed\n");
goto fail;
}
/* Connect to the conf db */
ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("confdb_init failed: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "confdb_init failed: %d\n", ret);
goto fail;
}
@@ -65,13 +65,13 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
ret = confdb_add_param(test_ctx->confdb, true,
"config/sssd", "domains", val);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("cannot add domain: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "cannot add domain: %d\n", ret);
goto fail;
}
dompath = talloc_asprintf(test_ctx, "config/domain/%s", domain_name);
if (dompath == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_asprintf failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_asprintf failed\n");
goto fail;
}
@@ -79,7 +79,7 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
ret = confdb_add_param(test_ctx->confdb, true,
dompath, "id_provider", val);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("cannot add id_provider: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "cannot add id_provider: %d\n", ret);
goto fail;
}
@@ -91,7 +91,7 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
val);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("cannot add parameter %s: %d\n", params[i].key, ret));
+ "cannot add parameter %s: %d\n", params[i].key, ret);
goto fail;
}
}
@@ -100,7 +100,7 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
ret = sssd_domain_init(test_ctx, test_ctx->confdb, domain_name,
tests_path, &test_ctx->dom);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("cannot add id_provider: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "cannot add id_provider: %d\n", ret);
goto fail;
}
test_ctx->sysdb = test_ctx->dom->sysdb;
@@ -121,7 +121,7 @@ void test_dom_suite_setup(const char *tests_path)
ret = mkdir(tests_path, 0775);
if (ret != 0 && errno != EEXIST) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not create test directory\n"));
+ "Could not create test directory\n");
}
}
@@ -136,14 +136,14 @@ void test_dom_suite_cleanup(const char *tests_path,
tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new failed\n");
return;
}
conf_db = talloc_asprintf(tmp_ctx, "%s/%s", tests_path, confdb_path);
if (!conf_db) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not construct conf_db path\n"));
+ "Could not construct conf_db path\n");
goto done;
}
@@ -151,14 +151,14 @@ void test_dom_suite_cleanup(const char *tests_path,
ret = unlink(conf_db);
if (ret != 0 && errno != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not delete the test config ldb file (%d) (%s)\n",
- errno, strerror(errno)));
+ "Could not delete the test config ldb file (%d) (%s)\n",
+ errno, strerror(errno));
}
sys_db = talloc_asprintf(tmp_ctx, "%s/%s", tests_path, sysdb_path);
if (!sys_db) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not construct sys_db path\n"));
+ "Could not construct sys_db path\n");
goto done;
}
@@ -166,16 +166,16 @@ void test_dom_suite_cleanup(const char *tests_path,
ret = unlink(sys_db);
if (ret != 0 && errno != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not delete the test ldb file (%d) (%s)\n",
- errno, strerror(errno)));
+ "Could not delete the test ldb file (%d) (%s)\n",
+ errno, strerror(errno));
}
errno = 0;
ret = rmdir(tests_path);
if (ret != 0) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not delete the test dir (%d) (%s)\n",
- errno, strerror(errno)));
+ "Could not delete the test dir (%d) (%s)\n",
+ errno, strerror(errno));
}
done:
diff --git a/src/tests/common_tev.c b/src/tests/common_tev.c
index 81b97d331..770f97d83 100644
--- a/src/tests/common_tev.c
+++ b/src/tests/common_tev.c
@@ -33,14 +33,14 @@ create_ev_test_ctx(TALLOC_CTX *mem_ctx)
test_ctx = talloc_zero(mem_ctx, struct sss_test_ctx);
if (test_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_zero failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed\n");
goto fail;
}
/* Create an event context */
test_ctx->ev = tevent_context_init(test_ctx);
if (test_ctx->ev == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_context_init failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "tevent_context_init failed\n");
goto fail;
}
diff --git a/src/tests/debug-tests.c b/src/tests/debug-tests.c
index 0902005af..0d2fe39fc 100644
--- a/src/tests/debug-tests.c
+++ b/src/tests/debug-tests.c
@@ -221,7 +221,7 @@ int test_helper_debug_check_message(int level)
goto done;
}
- DEBUG(level, ("%s", body));
+ DEBUG(level, "%s", body);
ret = fseek(file, 0, SEEK_END);
if (ret == -1) {
@@ -358,7 +358,7 @@ int test_helper_debug_is_empty_message(int level)
goto done;
}
- DEBUG(level, ("some error\n"));
+ DEBUG(level, "some error\n");
ret = fseek(file, 0, SEEK_END);
if (ret == -1) {
diff --git a/src/tests/files-tests.c b/src/tests/files-tests.c
index 5851a721f..8e1ac0c9d 100644
--- a/src/tests/files-tests.c
+++ b/src/tests/files-tests.c
@@ -64,14 +64,14 @@ static void teardown_files_test(void)
cmd = talloc_asprintf(test_ctx, "/bin/rm -rf %s\n", dir_path);
ret = system(cmd);
if (ret == -1) {
- DEBUG(1, ("Removing [%s] failed.\n", dir_path));
+ DEBUG(1, "Removing [%s] failed.\n", dir_path);
}
}
if (dst_path && test_ctx) {
cmd = talloc_asprintf(test_ctx, "/bin/rm -rf %s\n", dst_path);
ret = system(cmd);
if (ret == -1) {
- DEBUG(1, ("Removing [%s] failed.\n", dst_path));
+ DEBUG(1, "Removing [%s] failed.\n", dst_path);
}
}
@@ -109,7 +109,7 @@ START_TEST(test_remove_tree)
fail_unless(getcwd(origpath, PATH_MAX) == origpath, "Cannot getcwd\n");
fail_unless(errno == 0, "Cannot getcwd\n");
- DEBUG(5, ("About to delete %s\n", dir_path));
+ DEBUG(5, "About to delete %s\n", dir_path);
/* create a file */
ret = chdir(dir_path);
@@ -182,7 +182,7 @@ START_TEST(test_simple_copy)
fail_if(ret == -1, "Cannot chdir\n");
/* and finally copy.. */
- DEBUG(5, ("Will copy from '%s' to '%s'\n", dir_path, dst_path));
+ DEBUG(5, "Will copy from '%s' to '%s'\n", dir_path, dst_path);
ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
fail_unless(ret == EOK, "copy_tree failed\n");
@@ -224,7 +224,7 @@ START_TEST(test_copy_symlink)
fail_if(ret == -1, "Cannot chdir\n");
/* and finally copy.. */
- DEBUG(5, ("Will copy from '%s' to '%s'\n", dir_path, dst_path));
+ DEBUG(5, "Will copy from '%s' to '%s'\n", dir_path, dst_path);
ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
fail_unless(ret == EOK, "copy_tree failed\n");
@@ -262,7 +262,7 @@ START_TEST(test_copy_node)
fail_if(ret == -1, "Cannot chdir\n");
/* and finally copy.. */
- DEBUG(5, ("Will copy from '%s' to '%s'\n", dir_path, dst_path));
+ DEBUG(5, "Will copy from '%s' to '%s'\n", dir_path, dst_path);
ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
fail_unless(ret == EOK, "copy_tree failed\n");
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index 0c6b68b82..8eb3b8608 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -79,7 +79,7 @@ setup_krb5_child_test(TALLOC_CTX *mem_ctx, struct krb5_child_test_ctx **_ctx)
ctx->ev = tevent_context_init(ctx);
if (ctx->ev == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Could not init tevent context"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not init tevent context");
talloc_free(ctx);
return EFAULT;
}
@@ -116,8 +116,8 @@ create_dummy_krb5_ctx(TALLOC_CTX *mem_ctx, const char *realm)
&errval, &errstr, &errpos, NULL);
if (krb5_ctx->illegal_path_re == NULL) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Invalid Regular Expression pattern at position %d. "
- "(Error: %d [%s])\n", errpos, errval, errstr));
+ "Invalid Regular Expression pattern at position %d. "
+ "(Error: %d [%s])\n", errpos, errval, errstr);
goto fail;
}
talloc_set_destructor((TALLOC_CTX *) krb5_ctx, re_destructor);
@@ -180,8 +180,8 @@ create_dummy_pam_data(TALLOC_CTX *mem_ctx, const char *user,
if (ret) goto fail;
(void)sss_authtok_get_password(pd->authtok, &authtok, &authtok_len);
- DEBUG(SSSDBG_FUNC_DATA, ("Authtok [%s] len [%d]\n",
- authtok, (int)authtok_len));
+ DEBUG(SSSDBG_FUNC_DATA, "Authtok [%s] len [%d]\n",
+ authtok, (int)authtok_len);
return pd;
@@ -207,7 +207,7 @@ create_dummy_req(TALLOC_CTX *mem_ctx, const char *user,
pwd = getpwnam(user);
if (!pwd) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Cannot get info on user [%s]\n", user));
+ "Cannot get info on user [%s]\n", user);
goto fail;
}
@@ -222,7 +222,7 @@ create_dummy_req(TALLOC_CTX *mem_ctx, const char *user,
ret = krb5_get_simple_upn(kr, kr->krb5_ctx, NULL, kr->pd->user, NULL,
&kr->upn);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("krb5_get_simple_upn failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "krb5_get_simple_upn failed.\n");
goto fail;
}
@@ -236,7 +236,7 @@ create_dummy_req(TALLOC_CTX *mem_ctx, const char *user,
if (timeout) {
ret = dp_opt_set_int(kr->krb5_ctx->opts, KRB5_AUTH_TIMEOUT, timeout);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to set value for krb5_auth_timeout\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to set value for krb5_auth_timeout\n");
goto fail;
}
}
@@ -248,22 +248,22 @@ create_dummy_req(TALLOC_CTX *mem_ctx, const char *user,
true, true);
if (!kr->ccname) goto fail;
- DEBUG(SSSDBG_FUNC_DATA, ("ccname [%s] uid [%llu] gid [%llu]\n",
+ DEBUG(SSSDBG_FUNC_DATA, "ccname [%s] uid [%llu] gid [%llu]\n",
kr->ccname, (unsigned long long) kr->uid,
- (unsigned long long) kr->gid));
+ (unsigned long long) kr->gid);
} else {
kr->ccname = talloc_strdup(kr, ccname);
}
if (!kr->ccname) goto fail;
- DEBUG(SSSDBG_FUNC_DATA, ("ccname [%s] uid [%u] gid [%u]\n",
- kr->ccname, kr->uid, kr->gid));
+ DEBUG(SSSDBG_FUNC_DATA, "ccname [%s] uid [%u] gid [%u]\n",
+ kr->ccname, kr->uid, kr->gid);
ret = sss_krb5_precreate_ccache(kr->ccname,
kr->krb5_ctx->illegal_path_re,
kr->uid, kr->gid);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("create_ccache_dir failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "create_ccache_dir failed.\n");
goto fail;
}
@@ -445,7 +445,7 @@ main(int argc, const char *argv[])
rm_ccache = false;
break;
default:
- DEBUG(SSSDBG_FATAL_FAILURE, ("Unexpected option\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Unexpected option\n");
return 1;
}
}
@@ -459,28 +459,28 @@ main(int argc, const char *argv[])
}
if (!pc_user) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Please specify the user\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Please specify the user\n");
poptPrintUsage(pc, stderr, 0);
return 1;
}
if (!pc_realm) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Please specify the realm\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Please specify the realm\n");
poptPrintUsage(pc, stderr, 0);
return 1;
}
if (!password && !pc_passwd) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Password was not provided or asked for\n"));
+ "Password was not provided or asked for\n");
poptPrintUsage(pc, stderr, 0);
return 1;
}
if (pc_ccname && pc_ccname_tp) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Both ccname and ccname template specified, "
- "will prefer ccname\n"));
+ "Both ccname and ccname template specified, "
+ "will prefer ccname\n");
}
ret = setup_krb5_child_test(NULL, &ctx);
@@ -493,14 +493,14 @@ main(int argc, const char *argv[])
ctx->kr = create_dummy_req(ctx, pc_user, password ? password : pc_passwd,
pc_realm, pc_ccname, pc_ccname_tp, pc_timeout);
if (!ctx->kr) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Cannot create Kerberos request\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Cannot create Kerberos request\n");
ret = 4;
goto done;
}
req = handle_child_send(ctx, ctx->ev, ctx->kr);
if (!req) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Cannot create child request\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Cannot create child request\n");
ret = 4;
goto done;
}
@@ -515,7 +515,7 @@ main(int argc, const char *argv[])
ret = parse_krb5_child_response(ctx, ctx->buf, ctx->len,
ctx->kr->pd, 0, &ctx->res);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Could not parse child response\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Could not parse child response\n");
ret = 5;
goto done;
}
diff --git a/src/tests/resolv-tests.c b/src/tests/resolv-tests.c
index 8fde675f4..eb54e2c2c 100644
--- a/src/tests/resolv-tests.c
+++ b/src/tests/resolv-tests.c
@@ -273,11 +273,11 @@ static void test_ip_addr(struct tevent_req *req)
&status, NULL, &rhostent);
talloc_zfree(req);
if (recv_status != EOK) {
- DEBUG(2, ("resolv_gethostbyname_recv failed: %d\n", recv_status));
+ DEBUG(2, "resolv_gethostbyname_recv failed: %d\n", recv_status);
test_ctx->error = recv_status;
return;
}
- DEBUG(7, ("resolv_gethostbyname_recv status: %d\n", status));
+ DEBUG(7, "resolv_gethostbyname_recv status: %d\n", status);
test_ctx->error = ENOENT;
for (i = 0; rhostent->addr_list[i]; i++) {
@@ -310,7 +310,7 @@ START_TEST(test_resolv_ip_addr)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_ONLY,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
ret = ENOMEM;
}
@@ -342,11 +342,11 @@ static void test_localhost(struct tevent_req *req)
&status, NULL, &rhostent);
talloc_zfree(req);
if (recv_status != EOK) {
- DEBUG(2, ("resolv_gethostbyname_recv failed: %d\n", recv_status));
+ DEBUG(2, "resolv_gethostbyname_recv failed: %d\n", recv_status);
test_ctx->error = recv_status;
return;
}
- DEBUG(7, ("resolv_gethostbyname_recv status: %d\n", status));
+ DEBUG(7, "resolv_gethostbyname_recv status: %d\n", status);
test_ctx->error = ENOENT;
for (i = 0; rhostent->addr_list[i]; i++) {
@@ -379,7 +379,7 @@ START_TEST(test_resolv_localhost)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_FIRST,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
ret = ENOMEM;
}
@@ -410,12 +410,12 @@ static void test_negative(struct tevent_req *req)
&status, NULL, &hostent);
talloc_zfree(req);
if (recv_status == EOK) {
- DEBUG(7, ("resolv_gethostbyname_recv succeeded in a negative test\n"));
+ DEBUG(7, "resolv_gethostbyname_recv succeeded in a negative test\n");
return;
}
test_ctx->error = status;
- DEBUG(2, ("resolv_gethostbyname_recv status: %d: %s\n", status, resolv_strerror(status)));
+ DEBUG(2, "resolv_gethostbyname_recv status: %d: %s\n", status, resolv_strerror(status));
}
START_TEST(test_resolv_negative)
@@ -435,7 +435,7 @@ START_TEST(test_resolv_negative)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_FIRST,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
ret = ENOMEM;
}
@@ -482,8 +482,8 @@ static void test_internet(struct tevent_req *req)
inet_ntop(rhostent->family,
rhostent->addr_list[i]->ipaddr,
addr_buf, sizeof(addr_buf));
- DEBUG(2, ("Found address %s with TTL %d\n",
- addr_buf, rhostent->addr_list[i]->ttl));
+ DEBUG(2, "Found address %s with TTL %d\n",
+ addr_buf, rhostent->addr_list[i]->ttl);
}
}
break;
@@ -492,7 +492,7 @@ static void test_internet(struct tevent_req *req)
&txt_replies);
test_ctx->error = (txt_replies == NULL) ? ENOENT : EOK;
for (txtptr = txt_replies; txtptr != NULL; txtptr = txtptr->next) {
- DEBUG(2, ("TXT Record: %s\n", txtptr->txt));
+ DEBUG(2, "TXT Record: %s\n", txtptr->txt);
}
break;
case TESTING_SRV:
@@ -500,9 +500,9 @@ static void test_internet(struct tevent_req *req)
&srv_replies);
test_ctx->error = (srv_replies == NULL) ? ENOENT : EOK;
for (srvptr = srv_replies; srvptr != NULL; srvptr = srvptr->next) {
- DEBUG(2, ("SRV Record: %d %d %d %s\n", srvptr->weight,
+ DEBUG(2, "SRV Record: %d %d %d %s\n", srvptr->weight,
srvptr->priority, srvptr->port,
- srvptr->host));
+ srvptr->host);
}
break;
default:
@@ -511,7 +511,7 @@ static void test_internet(struct tevent_req *req)
}
talloc_zfree(req);
fail_if(recv_status != EOK, "The recv function failed: %d", recv_status);
- DEBUG(7, ("recv status: %d\n", status));
+ DEBUG(7, "recv status: %d\n", status);
if (rhostent != NULL) {
talloc_free(rhostent);
@@ -541,7 +541,7 @@ START_TEST(test_resolv_internet)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_FIRST,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
ret = ENOMEM;
}
@@ -612,7 +612,7 @@ static void resolv_free_context(struct tevent_context *ev,
struct timeval t, void *ptr)
{
struct resolv_ctx *rctx = talloc_get_type(ptr, struct resolv_ctx);
- DEBUG(7, ("freeing the context\n"));
+ DEBUG(7, "freeing the context\n");
talloc_free(rctx);
}
@@ -622,7 +622,7 @@ static void resolv_free_done(struct tevent_context *ev,
struct timeval t, void *ptr)
{
struct resolv_test_ctx *tctx = talloc_get_type(ptr, struct resolv_test_ctx);
- DEBUG(7, ("marking test as done\n"));
+ DEBUG(7, "marking test as done\n");
tctx->error = EOK;
tctx->done = true;
@@ -646,7 +646,7 @@ START_TEST(test_resolv_free_context)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_FIRST,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
fail("Error calling resolv_gethostbyname_send");
goto done;
@@ -683,7 +683,7 @@ static void resolv_free_req(struct tevent_context *ev,
struct timeval t, void *ptr)
{
struct tevent_req *req = talloc_get_type(ptr, struct tevent_req);
- DEBUG(7, ("freeing the request\n"));
+ DEBUG(7, "freeing the request\n");
talloc_free(req);
}
@@ -794,7 +794,7 @@ START_TEST(test_resolv_free_req)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_FIRST,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
fail("Error calling resolv_gethostbyname_send");
goto done;
@@ -871,7 +871,7 @@ START_TEST(test_resolv_timeout)
req = resolv_gethostbyname_send(test_ctx, test_ctx->ev,
test_ctx->resolv, hostname, IPV4_FIRST,
default_host_dbs);
- DEBUG(7, ("Sent resolv_gethostbyname\n"));
+ DEBUG(7, "Sent resolv_gethostbyname\n");
if (req == NULL) {
ret = ENOMEM;
}
diff --git a/src/tests/simple_access-tests.c b/src/tests/simple_access-tests.c
index 17026091f..0fa5d049f 100644
--- a/src/tests/simple_access-tests.c
+++ b/src/tests/simple_access-tests.c
@@ -95,7 +95,7 @@ void setup_simple(void)
conf_db = talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, TEST_CONF_FILE);
fail_if(conf_db == NULL, "Out of memory, aborting!");
- DEBUG(SSSDBG_TRACE_LIBS, ("CONFDB: %s\n", conf_db));
+ DEBUG(SSSDBG_TRACE_LIBS, "CONFDB: %s\n", conf_db);
/* Connect to the conf db */
ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
@@ -586,16 +586,16 @@ START_TEST(test_provider_init)
ret = sssm_simple_access_init(test_ctx->be_ctx, &bet_ops, (void**)&ctx);
fail_if(ret != EOK);
- DEBUG(SSSDBG_TRACE_FUNC, ("Checking allow users list\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Checking allow users list\n");
check_access_list(ctx->allow_users, correct);
- DEBUG(SSSDBG_TRACE_FUNC, ("Checking deny users list\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Checking deny users list\n");
check_access_list(ctx->deny_users, correct);
- DEBUG(SSSDBG_TRACE_FUNC, ("Checking allow groups list\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Checking allow groups list\n");
check_access_list(ctx->allow_groups, correct);
- DEBUG(SSSDBG_TRACE_FUNC, ("Checking deny groups list\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Checking deny groups list\n");
check_access_list(ctx->deny_groups, correct);
}
END_TEST
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index f7d84732a..a8177bbd2 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -99,7 +99,7 @@ static int _setup_sysdb_tests(struct sysdb_test_ctx **ctx, bool enumerate)
talloc_free(test_ctx);
return ENOMEM;
}
- DEBUG(3, ("CONFDB: %s\n", conf_db));
+ DEBUG(3, "CONFDB: %s\n", conf_db);
/* Connect to the conf db */
ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
@@ -1785,7 +1785,7 @@ static void cached_authentication_with_expiration(const char *username,
now = time(NULL);
expected_expire_date = now + (24 * 60 * 60);
- DEBUG(9, ("Setting SYSDB_LAST_ONLINE_AUTH to [%lld].\n", (long long) now));
+ DEBUG(9, "Setting SYSDB_LAST_ONLINE_AUTH to [%lld].\n", (long long) now);
data->attrs = sysdb_new_attrs(data);
ret = sysdb_attrs_add_time_t(data->attrs, SYSDB_LAST_ONLINE_AUTH, now);
diff --git a/src/tests/sysdb_ssh-tests.c b/src/tests/sysdb_ssh-tests.c
index 114c33ca7..034922d6f 100644
--- a/src/tests/sysdb_ssh-tests.c
+++ b/src/tests/sysdb_ssh-tests.c
@@ -84,7 +84,7 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx)
talloc_free(test_ctx);
return ENOMEM;
}
- DEBUG(3, ("CONFDB: %s\n", conf_db));
+ DEBUG(3, "CONFDB: %s\n", conf_db);
/* Connect to the conf db */
ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);