aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shi <[email protected]>2019-05-27 14:28:07 +0800
committerShuah Khan <[email protected]>2019-05-30 08:19:17 -0600
commitf97f3f8839eb9de5843066d80819884f7722c8c5 (patch)
tree6ed9776e925306f88102c0c521ababcc955d174f
parent00e38a5d753d7788852f81703db804a60a84c26e (diff)
kselftest/cgroup: fix incorrect test_core skip
The test_core will skip the test_cgcore_no_internal_process_constraint_on_threads test case if the 'cpu' controller missing in root's subtree_control. In fact we need to set the 'cpu' in subtree_control, to make the testing meaningful. ./test_core ... ok 4 # skip test_cgcore_no_internal_process_constraint_on_threads ... Signed-off-by: Alex Shi <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Roman Gushchin <[email protected]> Cc: Claudio Zumbo <[email protected]> Cc: Claudio <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Roman Gushchin <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
-rw-r--r--tools/testing/selftests/cgroup/test_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/cgroup/test_core.c b/tools/testing/selftests/cgroup/test_core.c
index d78f1c5366d3..79053a4f4783 100644
--- a/tools/testing/selftests/cgroup/test_core.c
+++ b/tools/testing/selftests/cgroup/test_core.c
@@ -198,7 +198,7 @@ static int test_cgcore_no_internal_process_constraint_on_threads(const char *roo
char *parent = NULL, *child = NULL;
if (cg_read_strstr(root, "cgroup.controllers", "cpu") ||
- cg_read_strstr(root, "cgroup.subtree_control", "cpu")) {
+ cg_write(root, "cgroup.subtree_control", "+cpu")) {
ret = KSFT_SKIP;
goto cleanup;
}