Lines Matching refs:root
22 static int test_cgcore_populated(const char *root) in test_cgcore_populated() argument
28 cg_test_a = cg_name(root, "cg_test_a"); in test_cgcore_populated()
29 cg_test_b = cg_name(root, "cg_test_a/cg_test_b"); in test_cgcore_populated()
30 cg_test_c = cg_name(root, "cg_test_a/cg_test_b/cg_test_c"); in test_cgcore_populated()
31 cg_test_d = cg_name(root, "cg_test_a/cg_test_b/cg_test_d"); in test_cgcore_populated()
63 if (cg_enter_current(root)) in test_cgcore_populated()
104 static int test_cgcore_invalid_domain(const char *root) in test_cgcore_invalid_domain() argument
109 grandparent = cg_name(root, "cg_test_grandparent"); in test_cgcore_invalid_domain()
110 parent = cg_name(root, "cg_test_grandparent/cg_test_parent"); in test_cgcore_invalid_domain()
111 child = cg_name(root, "cg_test_grandparent/cg_test_parent/cg_test_child"); in test_cgcore_invalid_domain()
139 cg_enter_current(root); in test_cgcore_invalid_domain()
156 static int test_cgcore_parent_becomes_threaded(const char *root) in test_cgcore_parent_becomes_threaded() argument
161 parent = cg_name(root, "cg_test_parent"); in test_cgcore_parent_becomes_threaded()
162 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_parent_becomes_threaded()
195 static int test_cgcore_no_internal_process_constraint_on_threads(const char *root) in test_cgcore_no_internal_process_constraint_on_threads() argument
200 if (cg_read_strstr(root, "cgroup.controllers", "cpu") || in test_cgcore_no_internal_process_constraint_on_threads()
201 cg_write(root, "cgroup.subtree_control", "+cpu")) { in test_cgcore_no_internal_process_constraint_on_threads()
206 parent = cg_name(root, "cg_test_parent"); in test_cgcore_no_internal_process_constraint_on_threads()
207 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_no_internal_process_constraint_on_threads()
232 cg_enter_current(root); in test_cgcore_no_internal_process_constraint_on_threads()
233 cg_enter_current(root); in test_cgcore_no_internal_process_constraint_on_threads()
247 static int test_cgcore_top_down_constraint_enable(const char *root) in test_cgcore_top_down_constraint_enable() argument
252 parent = cg_name(root, "cg_test_parent"); in test_cgcore_top_down_constraint_enable()
253 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_top_down_constraint_enable()
282 static int test_cgcore_top_down_constraint_disable(const char *root) in test_cgcore_top_down_constraint_disable() argument
287 parent = cg_name(root, "cg_test_parent"); in test_cgcore_top_down_constraint_disable()
288 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_top_down_constraint_disable()
323 static int test_cgcore_internal_process_constraint(const char *root) in test_cgcore_internal_process_constraint() argument
328 parent = cg_name(root, "cg_test_parent"); in test_cgcore_internal_process_constraint()
329 child = cg_name(root, "cg_test_parent/cg_test_child"); in test_cgcore_internal_process_constraint()
359 int (*fn)(const char *root);
374 char root[PATH_MAX]; in main() local
377 if (cg_find_unified_root(root, sizeof(root))) in main()
380 if (cg_read_strstr(root, "cgroup.subtree_control", "memory")) in main()
381 if (cg_write(root, "cgroup.subtree_control", "+memory")) in main()
385 switch (tests[i].fn(root)) { in main()