Lines Matching defs:ct

72 static void test_attach_lsm_set_config(struct lxc_container *ct)
74 ct->load_config(ct, NULL);
75 ct->set_config_item(ct, lsm_config_key, lsm_label);
76 ct->save_config(ct, NULL);
85 static int test_attach_lsm_func(struct lxc_container *ct)
103 ret = ct->attach(ct, test_attach_lsm_func_func, NULL, &attach_options, &pid);
131 static int test_attach_lsm_cmd(struct lxc_container *ct)
151 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
185 static void test_attach_lsm_set_config(struct lxc_container *ct) {}
186 static int test_attach_lsm_func(struct lxc_container *ct) { return 0; }
187 static int test_attach_lsm_cmd(struct lxc_container *ct) { return 0; }
196 static int test_attach_func(struct lxc_container *ct)
217 ret = ct->attach(ct, test_attach_func_func, NULL, &attach_options, &pid);
247 static int test_attach_cmd(struct lxc_container *ct)
256 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
270 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
286 * @ct : the container
288 static void test_ct_destroy(struct lxc_container *ct)
290 ct->stop(ct);
291 ct->destroy(ct);
292 lxc_container_put(ct);
307 struct lxc_container *ct = NULL;
317 if ((ct = lxc_container_new(name, lxcpath)) == NULL) {
321 if (ct->is_defined(ct)) {
322 ct->stop(ct);
323 ct->destroy(ct);
324 ct = lxc_container_new(name, lxcpath);
326 if (!ct->createl(ct, template, NULL, NULL, 0, NULL)) {
332 test_attach_lsm_set_config(ct);
334 ct->want_daemonize(ct, true);
335 if (!ct->startl(ct, 0, NULL)) {
339 return ct;
342 test_ct_destroy(ct);
343 ct = NULL;
345 return ct;
352 struct lxc_container *ct;
355 ct = test_ct_create(lxcpath, NULL, name, template);
356 if (!ct)
359 ret = test_attach_cmd(ct);
365 ret = test_attach_func(ct);
372 ret = test_attach_lsm_cmd(ct);
378 ret = test_attach_lsm_func(ct);
387 test_ct_destroy(ct);