Lines Matching refs:root
80 static int test_cgcore_destroy(const char *root) in test_cgcore_destroy() argument
87 cg_test = cg_name(root, "cg_test"); in test_cgcore_destroy()
142 static int test_cgcore_populated(const char *root) in test_cgcore_populated() argument
151 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_populated()
152 cg_test_b = cg_name(root, "cg_test_a/cg_test_b"); in test_cgcore_populated()
153 cg_test_c = cg_name(root, "cg_test_a/cg_test_b/cg_test_c"); in test_cgcore_populated()
154 cg_test_d = cg_name(root, "cg_test_a/cg_test_b/cg_test_d"); in test_cgcore_populated()
186 if (cg_enter_current(root)) in test_cgcore_populated()
275 static int test_cgcore_invalid_domain(const char *root) in test_cgcore_invalid_domain() argument
280 grandparent = cg_name(root, "cg_test_grandparent"); in test_cgcore_invalid_domain()
281 parent = cg_name(root, "cg_test_grandparent/cg_test_parent"); in test_cgcore_invalid_domain()
282 child = cg_name(root, "cg_test_grandparent/cg_test_parent/cg_test_child"); in test_cgcore_invalid_domain()
320 cg_enter_current(root); in test_cgcore_invalid_domain()
337 static int test_cgcore_parent_becomes_threaded(const char *root) in test_cgcore_parent_becomes_threaded() argument
342 parent = cg_name(root, "cg_test_parent"); in test_cgcore_parent_becomes_threaded()
343 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_parent_becomes_threaded()
376 static int test_cgcore_no_internal_process_constraint_on_threads(const char *root) in test_cgcore_no_internal_process_constraint_on_threads() argument
381 if (cg_read_strstr(root, "cgroup.controllers", "cpu") || in test_cgcore_no_internal_process_constraint_on_threads()
382 cg_write(root, "cgroup.subtree_control", "+cpu")) { in test_cgcore_no_internal_process_constraint_on_threads()
387 parent = cg_name(root, "cg_test_parent"); in test_cgcore_no_internal_process_constraint_on_threads()
388 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_no_internal_process_constraint_on_threads()
413 cg_enter_current(root); in test_cgcore_no_internal_process_constraint_on_threads()
414 cg_enter_current(root); in test_cgcore_no_internal_process_constraint_on_threads()
428 static int test_cgcore_top_down_constraint_enable(const char *root) in test_cgcore_top_down_constraint_enable() argument
433 parent = cg_name(root, "cg_test_parent"); in test_cgcore_top_down_constraint_enable()
434 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_top_down_constraint_enable()
463 static int test_cgcore_top_down_constraint_disable(const char *root) in test_cgcore_top_down_constraint_disable() argument
468 parent = cg_name(root, "cg_test_parent"); in test_cgcore_top_down_constraint_disable()
469 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_top_down_constraint_disable()
504 static int test_cgcore_internal_process_constraint(const char *root) in test_cgcore_internal_process_constraint() argument
509 parent = cg_name(root, "cg_test_parent"); in test_cgcore_internal_process_constraint()
510 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_internal_process_constraint()
550 static int test_cgcore_proc_migration(const char *root) in test_cgcore_proc_migration() argument
557 src = cg_name(root, "cg_src"); in test_cgcore_proc_migration()
558 dst = cg_name(root, "cg_dst"); in test_cgcore_proc_migration()
590 cg_enter_current(root); in test_cgcore_proc_migration()
623 static int test_cgcore_thread_migration(const char *root) in test_cgcore_thread_migration() argument
628 char *grps[3] = { (char *)root, NULL, NULL }; in test_cgcore_thread_migration()
632 dom = cg_name(root, "cg_dom"); in test_cgcore_thread_migration()
633 grps[1] = cg_name(root, "cg_dom/cg_src"); in test_cgcore_thread_migration()
634 grps[2] = cg_name(root, "cg_dom/cg_dst"); in test_cgcore_thread_migration()
669 cg_enter_current(root); in test_cgcore_thread_migration()
686 static int test_cgcore_lesser_euid_open(const char *root) in test_cgcore_lesser_euid_open() argument
695 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_lesser_euid_open()
696 cg_test_b = cg_name(root, "cg_test_b"); in test_cgcore_lesser_euid_open()
735 cg_enter_current(root); in test_cgcore_lesser_euid_open()
768 static int test_cgcore_lesser_ns_open(const char *root) in test_cgcore_lesser_ns_open() argument
783 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_lesser_ns_open()
784 cg_test_b = cg_name(root, "cg_test_b"); in test_cgcore_lesser_ns_open()
831 cg_enter_current(root); in test_cgcore_lesser_ns_open()
847 int (*fn)(const char *root);
867 char root[PATH_MAX]; in main() local
870 if (cg_find_unified_root(root, sizeof(root), &nsdelegate)) in main()
873 if (cg_read_strstr(root, "cgroup.subtree_control", "memory")) in main()
874 if (cg_write(root, "cgroup.subtree_control", "+memory")) in main()
878 switch (tests[i].fn(root)) { in main()