Lines Matching refs:root
78 static int test_cgcore_destroy(const char *root) in test_cgcore_destroy() argument
85 cg_test = cg_name(root, "cg_test"); in test_cgcore_destroy()
140 static int test_cgcore_populated(const char *root) in test_cgcore_populated() argument
149 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_populated()
150 cg_test_b = cg_name(root, "cg_test_a/cg_test_b"); in test_cgcore_populated()
151 cg_test_c = cg_name(root, "cg_test_a/cg_test_b/cg_test_c"); in test_cgcore_populated()
152 cg_test_d = cg_name(root, "cg_test_a/cg_test_b/cg_test_d"); in test_cgcore_populated()
184 if (cg_enter_current(root)) in test_cgcore_populated()
273 static int test_cgcore_invalid_domain(const char *root) in test_cgcore_invalid_domain() argument
278 grandparent = cg_name(root, "cg_test_grandparent"); in test_cgcore_invalid_domain()
279 parent = cg_name(root, "cg_test_grandparent/cg_test_parent"); in test_cgcore_invalid_domain()
280 child = cg_name(root, "cg_test_grandparent/cg_test_parent/cg_test_child"); in test_cgcore_invalid_domain()
318 cg_enter_current(root); in test_cgcore_invalid_domain()
335 static int test_cgcore_parent_becomes_threaded(const char *root) in test_cgcore_parent_becomes_threaded() argument
340 parent = cg_name(root, "cg_test_parent"); in test_cgcore_parent_becomes_threaded()
341 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_parent_becomes_threaded()
374 static int test_cgcore_no_internal_process_constraint_on_threads(const char *root) in test_cgcore_no_internal_process_constraint_on_threads() argument
379 if (cg_read_strstr(root, "cgroup.controllers", "cpu") || in test_cgcore_no_internal_process_constraint_on_threads()
380 cg_write(root, "cgroup.subtree_control", "+cpu")) { in test_cgcore_no_internal_process_constraint_on_threads()
385 parent = cg_name(root, "cg_test_parent"); in test_cgcore_no_internal_process_constraint_on_threads()
386 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_no_internal_process_constraint_on_threads()
411 cg_enter_current(root); in test_cgcore_no_internal_process_constraint_on_threads()
412 cg_enter_current(root); in test_cgcore_no_internal_process_constraint_on_threads()
426 static int test_cgcore_top_down_constraint_enable(const char *root) in test_cgcore_top_down_constraint_enable() argument
431 parent = cg_name(root, "cg_test_parent"); in test_cgcore_top_down_constraint_enable()
432 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_top_down_constraint_enable()
461 static int test_cgcore_top_down_constraint_disable(const char *root) in test_cgcore_top_down_constraint_disable() argument
466 parent = cg_name(root, "cg_test_parent"); in test_cgcore_top_down_constraint_disable()
467 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_top_down_constraint_disable()
502 static int test_cgcore_internal_process_constraint(const char *root) in test_cgcore_internal_process_constraint() argument
507 parent = cg_name(root, "cg_test_parent"); in test_cgcore_internal_process_constraint()
508 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_internal_process_constraint()
548 static int test_cgcore_proc_migration(const char *root) in test_cgcore_proc_migration() argument
555 src = cg_name(root, "cg_src"); in test_cgcore_proc_migration()
556 dst = cg_name(root, "cg_dst"); in test_cgcore_proc_migration()
588 cg_enter_current(root); in test_cgcore_proc_migration()
621 static int test_cgcore_thread_migration(const char *root) in test_cgcore_thread_migration() argument
626 char *grps[3] = { (char *)root, NULL, NULL }; in test_cgcore_thread_migration()
630 dom = cg_name(root, "cg_dom"); in test_cgcore_thread_migration()
631 grps[1] = cg_name(root, "cg_dom/cg_src"); in test_cgcore_thread_migration()
632 grps[2] = cg_name(root, "cg_dom/cg_dst"); in test_cgcore_thread_migration()
667 cg_enter_current(root); in test_cgcore_thread_migration()
684 static int test_cgcore_lesser_euid_open(const char *root) in test_cgcore_lesser_euid_open() argument
693 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_lesser_euid_open()
694 cg_test_b = cg_name(root, "cg_test_b"); in test_cgcore_lesser_euid_open()
733 cg_enter_current(root); in test_cgcore_lesser_euid_open()
766 static int test_cgcore_lesser_ns_open(const char *root) in test_cgcore_lesser_ns_open() argument
778 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_lesser_ns_open()
779 cg_test_b = cg_name(root, "cg_test_b"); in test_cgcore_lesser_ns_open()
826 cg_enter_current(root); in test_cgcore_lesser_ns_open()
842 int (*fn)(const char *root);
862 char root[PATH_MAX]; in main() local
865 if (cg_find_unified_root(root, sizeof(root))) in main()
868 if (cg_read_strstr(root, "cgroup.subtree_control", "memory")) in main()
869 if (cg_write(root, "cgroup.subtree_control", "+memory")) in main()
873 switch (tests[i].fn(root)) { in main()