Lines Matching refs:test_ctx
133 struct test_ctx {
147 struct test_ctx *tctx;
149 tctx = talloc_zero(NULL, struct test_ctx);
164 struct test_ctx *tctx = talloc_get_type(*state, struct test_ctx);
171 struct test_ctx *test_ctx = tevent_req_callback_data(req,
172 struct test_ctx);
175 test_ctx->error = timed_request_recv(req, &req_id);
177 if (test_ctx->error != EOK) {
178 test_ctx->done = true;
182 if (test_ctx->req_ids[test_ctx->finished_requests] != req_id) {
185 req_id, test_ctx->req_ids[test_ctx->finished_requests]);
186 test_ctx->error = EIO;
187 test_ctx->done = true;
191 test_ctx->finished_requests++;
192 if (test_ctx->finished_requests == test_ctx->num_requests) {
193 test_ctx->done = true;
203 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx);
211 req = timed_request_send(test_ctx,
212 test_ctx->ev,
213 test_ctx->qctx,
216 tevent_req_set_callback(req, test_kcm_queue_done, test_ctx);
218 test_ctx->num_requests = 1;
219 test_ctx->req_ids = req_ids;
221 while (test_ctx->done == false) {
222 tevent_loop_once(test_ctx->ev);
224 assert_int_equal(test_ctx->error, EOK);
232 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx);
243 req = timed_request_send(test_ctx,
244 test_ctx->ev,
245 test_ctx->qctx,
250 tevent_req_set_callback(req, test_kcm_queue_done, test_ctx);
252 req = timed_request_send(test_ctx,
253 test_ctx->ev,
254 test_ctx->qctx,
259 tevent_req_set_callback(req, test_kcm_queue_done, test_ctx);
261 test_ctx->num_requests = 2;
262 test_ctx->req_ids = req_ids;
264 while (test_ctx->done == false) {
265 tevent_loop_once(test_ctx->ev);
267 assert_int_equal(test_ctx->error, EOK);
276 struct test_ctx *test_ctx = talloc_get_type(*state, struct test_ctx);
288 req = timed_request_send(test_ctx,
289 test_ctx->ev,
290 test_ctx->qctx,
295 tevent_req_set_callback(req, test_kcm_queue_done, test_ctx);
300 req = timed_request_send(test_ctx,
301 test_ctx->ev,
302 test_ctx->qctx,
307 tevent_req_set_callback(req, test_kcm_queue_done, test_ctx);
309 test_ctx->num_requests = 2;
310 test_ctx->req_ids = req_ids;
312 while (test_ctx->done == false) {
313 tevent_loop_once(test_ctx->ev);
315 assert_int_equal(test_ctx->error, EOK);