Lines Matching +full:parent +full:- +full:child

1 /* SPDX-License-Identifier: GPL-2.0 */
32 return -1; in cg_check_frozen()
40 return -1; in cg_check_frozen()
62 int fd, ret = -1; in cg_enter_and_wait_for_frozen()
95 int fd, ret = -1; in cg_freeze_wait()
119 * re-parented.
245 * Wait until all child processes will enter in test_cgfreezer_tree()
329 for (i = 9; i >= 0 && cgroup[i]; i--) { in test_cgfreezer_tree()
395 * The test creates a cgroups and freezes it. Then it creates a child cgroup
396 * and populates it with a task. After that it checks that the child cgroup
397 * is frozen and the parent cgroup remains frozen too.
402 char *parent, *child = NULL; in test_cgfreezer_mkdir() local
405 parent = cg_name(root, "cg_test_mkdir_A"); in test_cgfreezer_mkdir()
406 if (!parent) in test_cgfreezer_mkdir()
409 child = cg_name(parent, "cg_test_mkdir_B"); in test_cgfreezer_mkdir()
410 if (!child) in test_cgfreezer_mkdir()
413 if (cg_create(parent)) in test_cgfreezer_mkdir()
416 if (cg_freeze_wait(parent, true)) in test_cgfreezer_mkdir()
419 if (cg_create(child)) in test_cgfreezer_mkdir()
422 pid = cg_run_nowait(child, child_fn, NULL); in test_cgfreezer_mkdir()
426 if (cg_wait_for_proc_count(child, 1)) in test_cgfreezer_mkdir()
429 if (cg_check_frozen(child, true)) in test_cgfreezer_mkdir()
432 if (cg_check_frozen(parent, true)) in test_cgfreezer_mkdir()
438 if (child) in test_cgfreezer_mkdir()
439 cg_destroy(child); in test_cgfreezer_mkdir()
440 free(child); in test_cgfreezer_mkdir()
441 if (parent) in test_cgfreezer_mkdir()
442 cg_destroy(parent); in test_cgfreezer_mkdir()
443 free(parent); in test_cgfreezer_mkdir()
448 * The test creates two nested cgroups, freezes the parent
449 * and removes the child. Then it checks that the parent cgroup
450 * remains frozen and it's possible to create a new child
451 * without unfreezing. The new child is frozen too.
456 char *parent, *child = NULL; in test_cgfreezer_rmdir() local
458 parent = cg_name(root, "cg_test_rmdir_A"); in test_cgfreezer_rmdir()
459 if (!parent) in test_cgfreezer_rmdir()
462 child = cg_name(parent, "cg_test_rmdir_B"); in test_cgfreezer_rmdir()
463 if (!child) in test_cgfreezer_rmdir()
466 if (cg_create(parent)) in test_cgfreezer_rmdir()
469 if (cg_create(child)) in test_cgfreezer_rmdir()
472 if (cg_freeze_wait(parent, true)) in test_cgfreezer_rmdir()
475 if (cg_destroy(child)) in test_cgfreezer_rmdir()
478 if (cg_check_frozen(parent, true)) in test_cgfreezer_rmdir()
481 if (cg_create(child)) in test_cgfreezer_rmdir()
484 if (cg_check_frozen(child, true)) in test_cgfreezer_rmdir()
490 if (child) in test_cgfreezer_rmdir()
491 cg_destroy(child); in test_cgfreezer_rmdir()
492 free(child); in test_cgfreezer_rmdir()
493 if (parent) in test_cgfreezer_rmdir()
494 cg_destroy(parent); in test_cgfreezer_rmdir()
495 free(parent); in test_cgfreezer_rmdir()
502 * 1) A (running) -> B (frozen)
503 * 2) B (frozen) -> A (running)
504 * 3) A (frozen) -> B (frozen)
649 if (len == -1) { in proc_check_stopped()
651 return -1; in proc_check_stopped()
656 return -1; in proc_check_stopped()
776 * which called vfork() and is waiting for a child.