Searched defs:test_ctx (Results 1 - 25 of 49) sorted by relevance

12

/sssd/src/tests/
H A Dcommon_tev.c32 struct sss_test_ctx *test_ctx; local
34 test_ctx = talloc_zero(mem_ctx, struct sss_test_ctx);
35 if (test_ctx == NULL) {
41 test_ctx->ev = tevent_context_init(test_ctx);
42 if (test_ctx->ev == NULL) {
47 return test_ctx;
50 talloc_free(test_ctx);
H A Dauth-tests.c54 struct sysdb_test_ctx *test_ctx; local
69 test_ctx = talloc_zero(NULL, struct sysdb_test_ctx);
70 if (test_ctx == NULL) {
78 test_ctx->ev = tevent_context_init(test_ctx);
79 if (test_ctx->ev == NULL) {
81 talloc_free(test_ctx);
85 conf_db = talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, TEST_CONF_FILE);
88 talloc_free(test_ctx);
94 ret = confdb_init(test_ctx,
158 struct sysdb_test_ctx *test_ctx = NULL; local
[all...]
H A Dcommon_dom.c237 struct sss_test_ctx *test_ctx = NULL; local
242 test_ctx = create_ev_test_ctx(mem_ctx);
243 if (test_ctx == NULL) {
248 ret = mock_confdb(test_ctx, tests_path, cdb_file, &test_ctx->confdb);
257 ret = mock_confdb_domain(test_ctx, test_ctx->confdb, tests_path,
269 ret = mock_domain(test_ctx, test_ctx->confdb, tests_path, domains[i],
279 test_ctx
[all...]
H A Dcrypto-tests.c35 static TALLOC_CTX *test_ctx = NULL; variable
69 test_ctx = talloc_new(NULL);
70 fail_if(test_ctx == NULL);
71 ck_leaks_push(test_ctx);
74 ret = sss_password_encrypt(test_ctx, password[i], strlen(password[i])+1,
78 ret = sss_password_decrypt(test_ctx, obfpwd, &ctpwd);
87 ck_leaks_pop(test_ctx);
88 talloc_free(test_ctx);
131 test_ctx = talloc_new(NULL);
132 fail_if(test_ctx
[all...]
H A Dfiles-tests.c46 static TALLOC_CTX *test_ctx = NULL; variable
51 test_ctx = talloc_new(NULL);
53 dir_path = mkdtemp(talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, tpl_dir));
54 dst_path = mkdtemp(talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, tpl_dir));
66 if (dir_path && test_ctx) {
67 cmd = talloc_asprintf(test_ctx, "/bin/rm -rf %s\n", dir_path);
73 if (dst_path && test_ctx) {
74 cmd = talloc_asprintf(test_ctx, "/bin/rm -rf %s\n", dst_path);
83 talloc_zfree(test_ctx);
250 tmp = talloc_asprintf(test_ctx, "
[all...]
H A Dsysdb_ssh-tests.c49 struct sysdb_test_ctx *test_ctx; local
64 test_ctx = talloc_zero(NULL, struct sysdb_test_ctx);
65 if (test_ctx == NULL) {
73 test_ctx->ev = tevent_context_init(test_ctx);
74 if (test_ctx->ev == NULL) {
76 talloc_free(test_ctx);
80 conf_db = talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, TEST_CONF_FILE);
83 talloc_free(test_ctx);
89 ret = confdb_init(test_ctx,
204 struct sysdb_test_ctx *test_ctx; local
246 struct sysdb_test_ctx *test_ctx; local
280 struct sysdb_test_ctx *test_ctx; local
316 struct sysdb_test_ctx *test_ctx; local
[all...]
/sssd/src/tests/cmocka/data_provider/
H A Dtest_dp_builtin.c38 struct test_ctx { struct
46 struct test_ctx *test_ctx; local
51 test_ctx = talloc_zero(global_talloc_context, struct test_ctx);
52 assert_non_null(test_ctx);
54 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB,
56 assert_non_null(test_ctx->tctx);
58 test_ctx
75 struct test_ctx *test_ctx; local
88 struct test_ctx *test_ctx; local
115 struct test_ctx *test_ctx; local
[all...]
H A Dtest_dp_request_table.c27 struct test_ctx { struct
33 struct test_ctx *test_ctx = NULL; local
38 test_ctx = talloc_zero(global_talloc_context, struct test_ctx);
39 assert_non_null(test_ctx);
41 ret = dp_req_table_init(test_ctx, &test_ctx->table);
43 assert_non_null(test_ctx->table);
45 check_leaks_push(test_ctx);
54 struct test_ctx *test_ctx; local
63 get_req_key(struct test_ctx* test_ctx) argument
83 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
125 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
152 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
228 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
[all...]
H A Dtest_dp_request.c36 struct test_ctx { struct
45 struct test_ctx *test_ctx; local
49 test_ctx = talloc_zero(global_talloc_context, struct test_ctx);
50 assert_non_null(test_ctx);
52 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB,
54 assert_non_null(test_ctx->tctx);
56 test_ctx
69 struct test_ctx *test_ctx; local
191 struct test_ctx *test_ctx; local
276 struct test_ctx *test_ctx; local
322 struct test_ctx *test_ctx; local
367 struct test_ctx *test_ctx; local
[all...]
/sssd/src/tests/cmocka/
H A Dtest_ipa_dn.c40 struct ipa_dn_test_ctx *test_ctx = NULL; local
42 test_ctx = talloc_zero(NULL, struct ipa_dn_test_ctx);
43 assert_non_null(test_ctx);
44 *state = test_ctx;
47 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB,
50 assert_non_null(test_ctx->tctx);
52 test_ctx->sysdb = test_ctx->tctx->sysdb;
65 struct ipa_dn_test_ctx *test_ctx local
97 struct ipa_dn_test_ctx *test_ctx = NULL; local
129 struct ipa_dn_test_ctx *test_ctx = NULL; local
[all...]
H A Dtest_ipa_subdomains_utils.c43 struct test_ipa_subdom_ctx *test_ctx; local
47 test_ctx = talloc_zero(global_talloc_context, struct test_ipa_subdom_ctx);
48 assert_non_null(test_ctx);
50 test_ctx->ldb = ldb_init(test_ctx, NULL);
51 assert_non_null(test_ctx->ldb);
53 check_leaks_push(test_ctx);
54 *state = test_ctx;
60 struct test_ipa_subdom_ctx *test_ctx; local
62 test_ctx
89 struct test_ipa_subdom_ctx *test_ctx; local
109 struct test_ipa_subdom_ctx *test_ctx; local
151 struct test_ipa_subdom_ctx *test_ctx; local
[all...]
H A Dtest_expire_common.c95 struct expire_test_ctx *test_ctx; local
97 test_ctx = talloc_get_type(*state, struct expire_test_ctx);
98 assert_non_null(test_ctx);
100 talloc_free(test_ctx);
H A Dtest_ad_subdomains.c76 struct test_ad_subdom_ctx *test_ctx; local
80 test_ctx = talloc_zero(global_talloc_context, struct test_ad_subdom_ctx);
81 assert_non_null(test_ctx);
83 test_ctx->ad_id_ctx = NULL;
85 check_leaks_push(test_ctx);
86 *state = test_ctx;
92 struct test_ad_subdom_ctx *test_ctx; local
94 test_ctx = talloc_get_type(*state, struct test_ad_subdom_ctx);
95 assert_non_null(test_ctx);
97 assert_true(check_leaks_pop(test_ctx)
105 struct test_ad_subdom_ctx *test_ctx; local
124 struct test_ad_subdom_ctx *test_ctx; local
162 struct test_ad_subdom_ctx *test_ctx; local
201 struct test_ad_subdom_ctx *test_ctx; local
238 struct test_ad_subdom_ctx *test_ctx; local
[all...]
H A Dtest_copy_keytab.c44 struct keytab_test_ctx *test_ctx; local
53 test_ctx = talloc_zero(global_talloc_context, struct keytab_test_ctx);
54 assert_non_null(test_ctx);
56 kerr = krb5_init_context(&test_ctx->kctx);
59 test_ctx->keytab_file_name = "FILE:" KEYTAB_PATH;
61 kerr = krb5_parse_name(test_ctx->kctx, KEYTAB_TEST_PRINC,
62 &test_ctx->principal);
67 mock_krb5_keytab_entry(&keys[0], test_ctx->principal, 12345, 1, 1, "11");
68 mock_krb5_keytab_entry(&keys[1], test_ctx->principal, 12345, 1, 2, "12");
69 mock_krb5_keytab_entry(&keys[2], test_ctx
83 struct keytab_test_ctx *test_ctx = talloc_get_type(*state, local
110 struct keytab_test_ctx *test_ctx = talloc_get_type(*state, local
160 struct keytab_test_ctx *test_ctx = talloc_get_type(*state, local
211 struct keytab_test_ctx *test_ctx = talloc_get_type(*state, local
[all...]
H A Dtest_krb5_common.c48 struct test_ctx { struct
54 struct test_ctx *test_ctx; local
58 test_ctx = talloc_zero(global_talloc_context, struct test_ctx);
59 assert_non_null(test_ctx);
61 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH, TEST_CONF_DB,
64 assert_non_null(test_ctx->tctx);
66 check_leaks_push(test_ctx);
74 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
181 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
[all...]
H A Dtest_ad_access_filter.c43 static struct ad_access_test_ctx *test_ctx; variable in typeref:struct:ad_access_test_ctx
48 test_ctx = talloc_zero(global_talloc_context,
50 assert_non_null(test_ctx);
52 test_ctx->dom = talloc_zero(test_ctx, struct sss_domain_info);
53 assert_non_null(test_ctx->dom);
55 test_ctx->dom->name = talloc_strdup(test_ctx->dom, DOM_NAME);
56 assert_non_null(test_ctx->dom->name);
62 talloc_free(test_ctx);
[all...]
H A Dtest_copy_ccache.c44 struct ccache_test_ctx *test_ctx; local
60 test_ctx = talloc_zero(global_talloc_context, struct ccache_test_ctx);
61 assert_non_null(test_ctx);
63 kerr = krb5_init_context(&test_ctx->kctx);
73 kerr = krb5_parse_name(test_ctx->kctx, CCACHE_TEST_CLIENT_PRINC,
74 &test_ctx->client_principal);
76 test_creds.client = test_ctx->client_principal;
77 kerr = krb5_parse_name(test_ctx->kctx, CCACHE_TEST_SERVER_PRINC,
78 &test_ctx->server_principal);
80 test_creds.server = test_ctx
140 struct ccache_test_ctx *test_ctx = talloc_get_type(*state, local
165 struct ccache_test_ctx *test_ctx = talloc_get_type(*state, local
[all...]
H A Dtest_child_common.c40 struct sss_test_ctx *test_ctx; member in struct:child_test_ctx
55 child_tctx->test_ctx = create_ev_test_ctx(child_tctx);
56 assert_non_null(child_tctx->test_ctx);
297 ret = child_handler_setup(child_tctx->test_ctx->ev, child_pid,
301 ret = test_ev_loop(child_tctx->test_ctx);
303 assert_int_equal(child_tctx->test_ctx->error, 0);
312 child_ctx->test_ctx->error = EIO;
314 child_ctx->test_ctx->error = 0;
317 child_ctx->test_ctx->done = true;
358 ret = child_handler_setup(child_tctx->test_ctx
[all...]
H A Dtest_data_provider_be.c64 struct test_ctx { struct
71 struct test_ctx *test_ctx = NULL; local
81 test_ctx = talloc_zero(global_talloc_context, struct test_ctx);
82 assert_non_null(test_ctx);
84 test_ctx->tctx = create_dom_test_ctx(test_ctx, TESTS_PATH,
87 assert_non_null(test_ctx->tctx);
89 test_ctx
123 struct test_ctx *test_ctx = talloc_get_type(pvt, struct test_ctx); local
134 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
149 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
191 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx); local
[all...]
H A Dtest_fqnames.c74 struct fqdn_test_ctx *test_ctx; local
78 test_ctx = talloc_zero(global_talloc_context, struct fqdn_test_ctx);
79 assert_non_null(test_ctx);
81 test_ctx->dom = create_test_domain(test_ctx, DOMNAME, FLATNAME,
84 check_leaks_push(test_ctx);
85 *state = test_ctx;
91 struct fqdn_test_ctx *test_ctx = talloc_get_type(*state, local
94 if (test_ctx == NULL) {
99 assert_true(check_leaks_pop(test_ctx)
107 struct fqdn_test_ctx *test_ctx = talloc_get_type(*state, local
139 struct fqdn_test_ctx *test_ctx = talloc_get_type(*state, local
171 struct fqdn_test_ctx *test_ctx = talloc_get_type(*state, local
203 struct fqdn_test_ctx *test_ctx = talloc_get_type(*state, local
244 parse_name_check(struct parse_name_test_ctx *test_ctx, const char *full_name, const char *default_domain, const char exp_ret, const char *exp_name, const char *exp_domain) argument
277 struct parse_name_test_ctx *test_ctx; local
322 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
331 sss_parse_name_check(struct parse_name_test_ctx *test_ctx, const char *input_name, const int exp_ret, const char *exp_name, const char *exp_domain) argument
364 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
380 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
393 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
405 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
420 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
434 struct fqdn_test_ctx *test_ctx = talloc_get_type(*state, local
452 struct parse_name_test_ctx *test_ctx = talloc_get_type(*state, local
[all...]
H A Dtest_ifp.c224 TALLOC_CTX *test_ctx; local
226 test_ctx = talloc_new(NULL);
227 assert_non_null(test_ctx);
229 res = ifp_parse_user_attr_list(test_ctx, input);
240 talloc_free(test_ctx);
247 TALLOC_CTX *test_ctx; local
249 test_ctx = talloc_new(NULL);
250 assert_non_null(test_ctx);
252 res = parse_attr_list_ex(test_ctx, input, defaults);
263 talloc_free(test_ctx);
365 struct ifp_test_req_ctx *test_ctx; local
389 struct ifp_test_req_ctx *test_ctx = talloc_get_type_abort(*state, local
[all...]
H A Dtest_krb5_wait_queue.c131 struct test_krb5_wait_queue *test_ctx; local
133 test_ctx = talloc_zero(global_talloc_context,
135 assert_non_null(test_ctx);
137 test_ctx->tctx = create_ev_test_ctx(test_ctx);
138 assert_non_null(test_ctx);
140 test_ctx->be_ctx = mock_be_ctx(test_ctx, test_ctx->tctx);
141 assert_non_null(test_ctx
155 struct test_krb5_wait_queue *test_ctx = local
162 test_krb5_wait_mock(struct test_krb5_wait_queue *test_ctx, const char *username, time_t us_delay, int ret, int pam_status, int dp_err) argument
178 test_krb5_wait_mock_success(struct test_krb5_wait_queue *test_ctx, const char *username) argument
190 struct test_krb5_wait_queue *test_ctx = local
209 struct test_krb5_wait_queue *test_ctx = \\ local
229 struct test_krb5_wait_queue *test_ctx = local
252 struct test_krb5_wait_queue *test_ctx = \\ local
276 struct test_krb5_wait_queue *test_ctx = local
299 struct test_krb5_wait_queue *test_ctx = \\ local
[all...]
H A Dtest_ldap_id_cleanup.c52 struct sysdb_test_ctx *test_ctx; local
64 test_ctx = talloc_zero(global_talloc_context, struct sysdb_test_ctx);
65 assert_non_null(test_ctx);
70 test_ctx->ev = tevent_context_init(test_ctx);
71 assert_non_null(test_ctx->ev);
73 conf_db = talloc_asprintf(test_ctx, "%s/%s", TESTS_PATH, TEST_CONF_FILE);
78 ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
82 ret = confdb_add_param(test_ctx
117 struct sysdb_test_ctx *test_ctx; local
146 struct sysdb_test_ctx *test_ctx = talloc_get_type_abort(*state, local
194 struct sysdb_test_ctx *test_ctx = talloc_get_type_abort(*state, local
[all...]
H A Dtest_sysdb_subdomains.c62 struct subdom_test_ctx *test_ctx; local
69 test_ctx = talloc_zero(global_talloc_context,
71 assert_non_null(test_ctx);
75 test_ctx->tctx = create_multidom_test_ctx(test_ctx, TESTS_PATH,
78 assert_non_null(test_ctx->tctx);
80 *state = test_ctx;
86 struct subdom_test_ctx *test_ctx = local
90 talloc_free(test_ctx);
98 struct subdom_test_ctx *test_ctx local
164 struct subdom_test_ctx *test_ctx = local
200 struct subdom_test_ctx *test_ctx = local
281 struct subdom_test_ctx *test_ctx = local
352 struct subdom_test_ctx *test_ctx = local
437 struct subdom_test_ctx *test_ctx = local
526 struct subdom_test_ctx *test_ctx = local
[all...]
H A Dtest_tools_colondb.c46 static void create_empty_file(TALLOC_CTX *test_ctx, const char *path, argument
53 tmp_ctx = talloc_new(test_ctx);
68 static void create_nonempty_file(TALLOC_CTX *test_ctx, argument
80 tmp_ctx = talloc_new(test_ctx);
83 create_empty_file(test_ctx, TESTS_PATH, TESTS_FILE);
98 TALLOC_CTX *test_ctx = NULL; local
102 test_ctx = talloc_new(global_talloc_context);
103 assert_non_null(test_ctx);
109 create_empty_file(test_ctx, TESTS_PATH, TESTS_FILE);
112 create_nonempty_file(test_ctx, TESTS_PAT
160 TALLOC_CTX *test_ctx = *state; local
171 TALLOC_CTX *test_ctx = *state; local
182 TALLOC_CTX *test_ctx = *state; local
193 TALLOC_CTX *test_ctx = *state; local
204 TALLOC_CTX *test_ctx = *state; local
216 TALLOC_CTX *test_ctx = *state; local
227 TALLOC_CTX *test_ctx = *state; local
248 TALLOC_CTX *test_ctx = *state; local
269 TALLOC_CTX *test_ctx = *state; local
295 TALLOC_CTX *test_ctx = *state; local
318 TALLOC_CTX *test_ctx = *state; local
[all...]

Completed in 4987 milliseconds

12