cgroup_fj/cgroup_fj_stress.sh: Fix failures on cgroup unmounted case
PATCH 1/1 cgroup_fj/cgroup_fj_stress.sh: Fix failures on cgroup unmounted case
Test fails when cgroup subsystem is not mounted beforehand because of the misused "mounted" in setup(), which doesn't represent the current mount status exactly but the mount status before the test, so fix this.
--- testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh | 3 --- testcases/kernel/controllers/cgroup_fj/cgroup_fj_utility.sh | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-)
testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh +0 -3
@@ -194,9 +194,6 @@ if [ $mount_times -ne 1 ]; then setup; $TESTROOT/cgroup_fj_proc & pid=$! - if [ $mounted -ne 1 ]; then - mount_cgroup; - fi mkdir_subgroup; if [ "$subsystem" == "cpuset" ]; then if [ "$exist_cpuset" != "" ]; then
testcases/kernel/controllers/cgroup_fj/cgroup_fj_utility.sh +5 -2
@@ -430,15 +430,18 @@ setup() if [ "$mount_point" == "" ]; then mounted=0 + mounted_now=0 mount_point=/dev/cgroup + else + mounted_now=1 fi - if [ -e $mount_point ] && [ $mounted -ne 1 ]; then + if [ -e $mount_point ] && [ $mounted_now -ne 1 ]; then rm -rf $mount_point cleanup fi - if [ $mounted -ne 1 ]; then + if [ $mounted_now -ne 1 ]; then do_mkdir 1 1 $mount_point mount_cgroup fi
Signature · 1 line
1.8.4.2
PATCH 1/1 cgroup_fj/cgroup_fj_stress.sh: Fix failures on cgroup unmounted case
Hi!
Quoted 3 lines · Guangwen Feng
Test fails when cgroup subsystem is not mounted beforehand because of the misused "mounted" in
setup(), which doesn't represent the current mount status exactly but the mount status before the test, so fix this.
Thank you, you are right.
In previous kernel versions, it was possible to mount cgroups several times. So actually the best solution would be to remove the option to mount them several times.
I will send a patch to correct this.
Best,
Cedric
Signature · 1 line
Cedric Hnyda