From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] cgroup: fix mount errors on cgroup subsys
Date: Wed, 23 Nov 2016 13:35:21 +0100 [thread overview]
Message-ID: <20161123123521.GE3346@rei.lan> (raw)
In-Reply-To: <1479899346-4261-1-git-send-email-liwang@redhat.com>
Hi!
> ---
> .../controllers/cgroup/cgroup_regression_test.sh | 46 +++++++++++++++++++++-
> 1 file changed, 44 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> index 30d0dbf..971243f 100755
> --- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> +++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> @@ -181,10 +181,17 @@ test_3()
> return
> fi
>
> + local cpu=cpu
> +
> + # For rhel7.3 or later, cpu is always binding with cpuacct subsys
> + if grep -w cpu /proc/mounts ; then
> + cpu=$(basename $(grep -w cpu /proc/mounts | cut -d ' ' -f 2))
> + fi
> +
> # Run the test for 30 secs
> - mount -t cgroup -o cpu xxx cgroup/
> + mount -t cgroup -o $cpu xxx cgroup/
> if [ $? -ne 0 ]; then
> - tst_resm TFAIL "Failed to mount cpu subsys"
> + tst_resm TFAIL "Failed to mount $cpu subsys"
> failed=1
> return
> fi
Why can't we mount the cgroup only when it's not mounted yet and
use the path it's mounted on otherwise? We do that for the functional
tetscases already.
And I do not think that umounting system cgroups is a good idea either.
I would say that the test should use whatever is mounted on the system
and if that is not possible I would rather produce TCONF than fiddle
with umounting cgroups from the standard system path.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-11-23 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 11:09 [LTP] [PATCH] cgroup: fix mount errors on cgroup subsys Li Wang
2016-11-23 12:35 ` Cyril Hrubis [this message]
2016-11-24 10:08 ` Li Wang
2016-11-24 10:16 ` Cyril Hrubis
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=20161123123521.GE3346@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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