Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: alex.shi at linux.alibaba.com (Alex Shi)
Subject: [PATCH v3 3/3] kselftest/cgroup: fix incorrect test_core skip
Date: Mon, 27 May 2019 14:28:07 +0800	[thread overview]
Message-ID: <20190527062807.93404-3-alex.shi@linux.alibaba.com> (raw)
In-Reply-To: <20190527062807.93404-1-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 <alex.shi at linux.alibaba.com>
Cc: Shuah Khan <shuah at kernel.org>
Cc: Tejun Heo <tj at kernel.org>
Cc: Roman Gushchin <guro at fb.com>
Cc: Claudio Zumbo <claudioz at fb.com>
Cc: Claudio <claudiozumbo at gmail.com>
Cc: linux-kselftest at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Reviewed-by: Roman Gushchin <guro at fb.com>
Acked-by: Tejun Heo <tj at kernel.org>
---
 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

WARNING: multiple messages have this Message-ID (diff)
From: alex.shi@linux.alibaba.com (Alex Shi)
Subject: [PATCH v3 3/3] kselftest/cgroup: fix incorrect test_core skip
Date: Mon, 27 May 2019 14:28:07 +0800	[thread overview]
Message-ID: <20190527062807.93404-3-alex.shi@linux.alibaba.com> (raw)
Message-ID: <20190527062807.gSq7GvLZk8NmMiJTwpDxqv9I9FLt9FML0wJtWEGG3Kw@z> (raw)
In-Reply-To: <20190527062807.93404-1-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 <alex.shi at linux.alibaba.com>
Cc: Shuah Khan <shuah at kernel.org>
Cc: Tejun Heo <tj at kernel.org>
Cc: Roman Gushchin <guro at fb.com>
Cc: Claudio Zumbo <claudioz at fb.com>
Cc: Claudio <claudiozumbo at gmail.com>
Cc: linux-kselftest at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Reviewed-by: Roman Gushchin <guro at fb.com>
Acked-by: Tejun Heo <tj at kernel.org>
---
 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

  parent reply	other threads:[~2019-05-27  6:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  6:28 [PATCH v3 1/3] kselftest/cgroup: fix unexpected testing failure on test_memcontrol alex.shi
2019-05-27  6:28 ` Alex Shi
2019-05-27  6:28 ` [PATCH v3 2/3] kselftest/cgroup: fix unexpected testing failure on test_core alex.shi
2019-05-27  6:28   ` Alex Shi
2019-05-27  6:28 ` alex.shi [this message]
2019-05-27  6:28   ` [PATCH v3 3/3] kselftest/cgroup: fix incorrect test_core skip Alex Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190527062807.93404-3-alex.shi@linux.alibaba.com \
    --to=linux-kselftest@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox