controllers/cgroup_fj_common.sh: Fix mountpoint mismatch
PATCH 1/1 controllers/cgroup_fj_common.sh: Fix mountpoint mismatch
Only grepping subsystem name in /proc/cgroups may lead to mismatch, e.g. grep -w debug /proc/mounts will wrongly return debugfs /sys/kernel/debug debugfs as well, so fix this by adding a grep for "cgroup".
Signed-off-by Guangwen Feng <[email protected]>
--- testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh +2 -1
@@ -93,7 +93,8 @@ setup() tst_tmpdir TST_CLEANUP=cleanup - mount_point=`grep -w $subsystem /proc/mounts | cut -f 2 | cut -d " " -f2` + mount_point=`grep -w $subsystem /proc/mounts | grep -w "cgroup" | \ + cut -f 2 | cut -d " " -f2` if [ -z "$mount_point" ]; then try_umount=1
Signature · 1 line
1.8.4.2
PATCH 1/1 controllers/cgroup_fj_common.sh: Fix mountpoint mismatch
Hi!
Ping, thanks!
Best Regards,
Guangwen Feng
Quoted 24 lines · Guangwen Feng
Only grepping subsystem name in
/proc/cgroupsmay lead to mismatch, e.g. grep -w debug/proc/mountswill wrongly return debugfs/sys/kernel/debugdebugfs as well, so fix this by adding a grep for "cgroup".Signed-off-by Guangwen Feng <[email protected]>--- testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh +2
-1@@ -93,7 +93,8 @@ setup() tst_tmpdir TST_CLEANUP=cleanup - mount_point=`grep -w $subsystem /proc/mounts | cut -f 2 | cut -d " " -f2` + mount_point=`grep -w $subsystem /proc/mounts | grep -w "cgroup" | \ + cut -f 2 | cut -d " " -f2` if [ -z "$mount_point" ]; then try_umount=1
PATCH 1/1 controllers/cgroup_fj_common.sh: Fix mountpoint mismatch
In reply to Guangwen FengHi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]