From: Ivana Hutarova Varekova Date: Fri, 18 May 2012 15:59:01 +0000 (+0200) Subject: testsuite: wrong cgroup mount points parsing X-Git-Tag: v0.41~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75aab8fd7c5b3bc71b7be889f83f6bbf1dd65ee3;p=thirdparty%2Flibcgroup.git testsuite: wrong cgroup mount points parsing 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 Acked-By: Jan Safranek --- diff --git a/tests/runlibcgrouptest.sh b/tests/runlibcgrouptest.sh index df1a9211..12b92536 100755 --- a/tests/runlibcgrouptest.sh +++ b/tests/runlibcgrouptest.sh @@ -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 ]