Lines Matching defs:child_tctx

47     struct child_test_ctx *child_tctx;
52 child_tctx = talloc(global_talloc_context, struct child_test_ctx);
53 assert_non_null(child_tctx);
55 child_tctx->test_ctx = create_ev_test_ctx(child_tctx);
56 assert_non_null(child_tctx->test_ctx);
58 ret = pipe(child_tctx->pipefd_from_child);
61 child_tctx->pipefd_from_child[0],
62 child_tctx->pipefd_from_child[1]);
64 ret = pipe(child_tctx->pipefd_to_child);
67 child_tctx->pipefd_to_child[0],
68 child_tctx->pipefd_to_child[1]);
70 *state = child_tctx;
76 struct child_test_ctx *child_tctx = talloc_get_type(*state,
79 talloc_free(child_tctx);
91 struct child_test_ctx *child_tctx = talloc_get_type(*state,
97 exec_child(child_tctx,
98 child_tctx->pipefd_to_child,
99 child_tctx->pipefd_from_child,
123 struct child_test_ctx *child_tctx;
126 ret = child_test_setup((void **) &child_tctx);
131 child_tctx->save_debug_timestamps = debug_timestamps;
132 *state = child_tctx;
139 struct child_test_ctx *child_tctx = talloc_get_type(*state,
143 debug_timestamps = child_tctx->save_debug_timestamps;
144 ret = child_test_teardown((void **) &child_tctx);
152 static void extra_args_test(struct child_test_ctx *child_tctx,
168 exec_child_ex(child_tctx,
169 child_tctx->pipefd_to_child,
170 child_tctx->pipefd_from_child,
197 struct child_test_ctx *child_tctx = talloc_get_type(*state,
200 extra_args_test(child_tctx, false);
206 struct child_test_ctx *child_tctx = talloc_get_type(*state,
209 extra_args_test(child_tctx, true);
214 struct child_test_ctx *child_tctx = talloc_get_type(*state,
217 extra_args_test(child_tctx, false);
221 struct child_test_ctx *child_tctx,
238 struct child_test_ctx *child_tctx = talloc_get_type(*state,
242 io_fds = talloc(child_tctx, struct child_io_fds);
248 io_fds->read_from_child_fd = child_tctx->pipefd_from_child[0];
249 io_fds->write_to_child_fd = child_tctx->pipefd_to_child[1];
256 close(child_tctx->pipefd_from_child[0]);
260 close(child_tctx->pipefd_from_child[1]);
264 close(child_tctx->pipefd_to_child[0]);
268 close(child_tctx->pipefd_to_child[1]);
281 struct child_test_ctx *child_tctx = talloc_get_type(*state,
291 exec_child(child_tctx,
292 child_tctx->pipefd_to_child,
293 child_tctx->pipefd_from_child,
297 ret = child_handler_setup(child_tctx->test_ctx->ev, child_pid,
298 test_child_cb, child_tctx, &child_old_ctx);
301 ret = test_ev_loop(child_tctx->test_ctx);
303 assert_int_equal(child_tctx->test_ctx->error, 0);
325 struct child_test_ctx *child_tctx = talloc_get_type(*state,
332 io_fds = talloc(child_tctx, struct child_io_fds);
341 exec_child_ex(child_tctx,
342 child_tctx->pipefd_to_child,
343 child_tctx->pipefd_from_child,
350 io_fds->read_from_child_fd = child_tctx->pipefd_from_child[0];
351 close(child_tctx->pipefd_from_child[1]);
352 io_fds->write_to_child_fd = child_tctx->pipefd_to_child[1];
353 close(child_tctx->pipefd_to_child[0]);
358 ret = child_handler_setup(child_tctx->test_ctx->ev, child_pid,
362 req = echo_child_write_send(child_tctx, child_tctx, io_fds, ECHO_STR);
365 ret = test_ev_loop(child_tctx->test_ctx);
377 struct child_test_ctx *child_tctx,
388 echo_state->child_test_ctx = child_tctx;
396 subreq = write_pipe_send(child_tctx, child_tctx->test_ctx->ev,
460 struct child_test_ctx *child_tctx = talloc_get_type(*state,
468 ret = sss_sigchld_init(child_tctx, child_tctx->test_ctx->ev, &sc_ctx);
474 exec_child(child_tctx,
475 child_tctx->pipefd_to_child,
476 child_tctx->pipefd_from_child,
480 ret = sss_child_register(child_tctx, sc_ctx,
483 child_tctx, &sss_child);
486 ret = test_ev_loop(child_tctx->test_ctx);
488 assert_int_equal(child_tctx->test_ctx->error, 0);