diff options
author | Balbir Singh <balbir@linux.vnet.ibm.com> | 2008-12-17 15:03:49 +0000 |
---|---|---|
committer | Balbir Singh <balbir@linux.vnet.ibm.com> | 2008-12-17 15:03:49 +0000 |
commit | 0adf296297252e7ad4cb7821bbd44ba84b31333f (patch) | |
tree | abb48dfa51c04ce4bede8481d6edd94635f1cda9 /tests/runlibcgrouptest.sh | |
parent | 5058d87a7e7fea00564b1b5cadbb75b0634a5857 (diff) | |
download | libcg-0adf296297252e7ad4cb7821bbd44ba84b31333f.tar.gz libcg-0adf296297252e7ad4cb7821bbd44ba84b31333f.tar.xz libcg-0adf296297252e7ad4cb7821bbd44ba84b31333f.zip |
libcgroup Test: change subsyscheck logic in testscript
Hi
The shell script as expected does not do a non null check using -n option
as i observed. hence changing the logic as below.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@247 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/runlibcgrouptest.sh')
-rw-r--r-- | tests/runlibcgrouptest.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/runlibcgrouptest.sh b/tests/runlibcgrouptest.sh index 69a7a68..30edc31 100644 --- a/tests/runlibcgrouptest.sh +++ b/tests/runlibcgrouptest.sh @@ -21,7 +21,7 @@ MOUNTPOINT=/dev/cgroup_controllers; # Just to initialize TARGET=/dev/cgroup_controllers; CONTROLLERS=cpu,memory; NUM_MOUNT=1; # Number of places to be mounted on - +MULTIMOUNT=false; # mounted at on epoint only debug() { # Function parameter is the string to print out @@ -66,7 +66,7 @@ umount_fs () PROC_ENTRY=`cat /proc/mounts|grep cgroup|tr -s [:space:]|cut -d" " -f2`; # Get first mountpoint in case of multiple mounts PROC_ENTRY=`echo $PROC_ENTRY|cut -d" " -f1`; - if [ -n "$PROC_ENTRY" ] + if [ ! -z "$PROC_ENTRY" ] then TARGET=$PROC_ENTRY; # Need to take care if there are tasks running in any group ?? @@ -93,15 +93,15 @@ no_controllers() MEMORY=`cat /proc/cgroups|grep -w memory|cut -f1`; fi; - if [ -n $CPU ] && [ -n $MEMORY ] + if [ ! -z $CPU ] && [ ! -z $MEMORY ] then CONTROLLERS=$CPU,$MEMORY ; return 1; # false - elif [ -n $CPU ] + elif [ ! -z $CPU ] then CONTROLLERS=$CPU ; return 1; # false - elif [ -n $MEMORY ] + elif [ ! -z $MEMORY ] then CONTROLLERS=$MEMORY ; return 1; # false |