From mboxrd@z Thu Jan 1 00:00:00 1970 From: alex.shi at linux.alibaba.com (Alex Shi) Date: Mon, 27 May 2019 14:28:07 +0800 Subject: [PATCH v3 3/3] kselftest/cgroup: fix incorrect test_core skip In-Reply-To: <20190527062807.93404-1-alex.shi@linux.alibaba.com> References: <20190527062807.93404-1-alex.shi@linux.alibaba.com> Message-ID: <20190527062807.93404-3-alex.shi@linux.alibaba.com> 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 Cc: Shuah Khan Cc: Tejun Heo Cc: Roman Gushchin Cc: Claudio Zumbo Cc: Claudio Cc: linux-kselftest at vger.kernel.org Cc: linux-kernel at vger.kernel.org Reviewed-by: Roman Gushchin Acked-by: Tejun Heo --- tools/testing/selftests/cgroup/test_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.19.1.856.g8858448bb From mboxrd@z Thu Jan 1 00:00:00 1970 From: alex.shi@linux.alibaba.com (Alex Shi) Date: Mon, 27 May 2019 14:28:07 +0800 Subject: [PATCH v3 3/3] kselftest/cgroup: fix incorrect test_core skip In-Reply-To: <20190527062807.93404-1-alex.shi@linux.alibaba.com> References: <20190527062807.93404-1-alex.shi@linux.alibaba.com> Message-ID: <20190527062807.93404-3-alex.shi@linux.alibaba.com> Content-Type: text/plain; charset="UTF-8" Message-ID: <20190527062807.gSq7GvLZk8NmMiJTwpDxqv9I9FLt9FML0wJtWEGG3Kw@z> 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 Cc: Shuah Khan Cc: Tejun Heo Cc: Roman Gushchin Cc: Claudio Zumbo Cc: Claudio Cc: linux-kselftest at vger.kernel.org Cc: linux-kernel at vger.kernel.org Reviewed-by: Roman Gushchin Acked-by: Tejun Heo --- tools/testing/selftests/cgroup/test_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.19.1.856.g8858448bb