On 05/13/2012 07:10 PM, Ivana Hutarova Varekova wrote:
> 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 <varek...@redhat.com>
Acked-By: Jan Safranek <jsafr...@redhat.com>

> ---
> 
>  tests/runlibcgrouptest.sh |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/runlibcgrouptest.sh b/tests/runlibcgrouptest.sh
> index 2a7ab3d..a5c7404 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 ]
> @@ -75,20 +75,20 @@ check_mount_fs ()
>  
>  umount_fs ()
>  {
> -     PROC_ENTRY_NUMBER=`cat /proc/mounts|grep cgroup | wc -l`;
> +     PROC_ENTRY_NUMBER=`cat /proc/mounts|grep ^cgroup | wc -l`;
>       NUMBER=1;
>       #go and remove all ot opaque mount points
>       while [ $PROC_ENTRY_NUMBER -ge $NUMBER ]
>       do
>               # Get $NUMBER-th mountpoint in case of multiple mount
> -             PROC_ENTRY=`cat /proc/mounts|grep cgroup|\
> +             PROC_ENTRY=`cat /proc/mounts|grep ^cgroup|\
>                               tr -s [:space:]|cut -d" " -f2 |\
>                               head -n$NUMBER | tail -n1`;
>               # if the hierarchy is opaque skip to next item
>               if [ -n "$OPAQUE_HIERARCHY" ]
>               then
>                       # find whether is the NUMBER-th item opaque
> -                     PROC_ENTRY_OPT=`cat /proc/mounts|grep cgroup|\
> +                     PROC_ENTRY_OPT=`cat /proc/mounts|grep ^cgroup|\
>                               tr -s [:space:]|cut -d" " -f4 |\
>                               head -n$NUMBER | tail -n1`;
>                       IS_OPAQUE=`echo $PROC_ENTRY_OPT |\
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Libcg-devel mailing list
> Libcg-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libcg-devel


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to