]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
testsuite: wrong cgroup mount points parsing
authorIvana Hutarova Varekova <varekova@redhat.com>
Fri, 18 May 2012 15:59:01 +0000 (17:59 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Fri, 18 May 2012 15:59:01 +0000 (17:59 +0200)
testsuite: runlibcgrouptest.sh has too benevolent mount points parsing
thus there are filtred other mount points (not only cgroup one) as well.

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-By: Jan Safranek <jsafrane@redhat.com>
tests/runlibcgrouptest.sh

index df1a9211d804d089876a71bf93b7c112a943c5f4..12b92536f1ee3d31227e4a017d52360f8515a4cf 100755 (executable)
@@ -48,7 +48,7 @@ debug()
 check_mount_fs ()
 {
        local NUM_MOUNT=0;
-       CGROUP=`cat /proc/mounts|grep -w cgroup|tr -s [:space:]|cut -d" " -f3`;
+       CGROUP=`cat /proc/mounts|grep -w ^cgroup|tr -s [:space:]|cut -d" " -f3`;
 
        # get first word in case of multiple mounts
        CGROUP=`echo $CGROUP|cut -d" " -f1`;
@@ -56,7 +56,7 @@ check_mount_fs ()
        debug "check_mount_fs(): CGROUP is $CGROUP";
        if [ "$CGROUP" = "cgroup" ]
        then
-               NUM_MOUNT=`cat /proc/mounts|grep -w cgroup|wc -l`;
+               NUM_MOUNT=`cat /proc/mounts|grep -w ^cgroup|wc -l`;
                debug "check_mount_fs(): fs mounted at $NUM_MOUNT places";
 
                if [ $NUM_MOUNT -eq 1 ]