summaryrefslogtreecommitdiffstats
path: root/tests/runlibcgrouptest.sh
Commit message (Collapse)AuthorAgeFilesLines
* Add warrning when test script is started by normal userJan Safranek2009-03-261-0/+7
| | | | | | | | The runlibcgrouptest.sh will now whine when script is started by non-root user. Root permissions are needed to create directories and mount the cgroups there. Signed-off-by: Jan Safranek <jsafrane@redhat.com>
* Fix runlibcgrouptest.sh exit codesJan Safranek2009-03-261-5/+10
| | | | | | | | | Automake's 'make check' executes runlibcgrouptest.sh automatically. It interprets exit code '77' as 'skip the test' and it is not counted as failure. Also the script should return nozero exit code != 77 when some test fails. Signed-off-by: Jan Safranek <jsafrane@redhat.com>
* Make runlibcgrouptest.sh executableJan Safranek2009-03-261-0/+0
| | | | | | runlibcgrouptest.sh should be executable, so 'make check' can execute it. Signed-off-by: Jan Safranek <jsafrane@redhat.com>
* libcgroup Test: libcgrouptest-fix-cntlr-order-error-in-scriptBalbir Singh2008-12-171-3/+3
| | | | | | | | | Sometimes on some machines, encounterd an issue of getting the controllers information in reverse order. So keeping the uniformity for future. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@273 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: make-controller-use-generic-in-binaryBalbir Singh2008-12-171-12/+35
| | | | | | | | | | | | | | | | | | This patch makes the use of controllers available from script more generic. All possible controllers in Linux kernel are to be kept as enum parameters and a corresponding mapping is done in both, the script and binary. The testcases are no more hardcoded with respect to controllers. The function set_controller() need to be updated with respect to the controllers and control file. The challenges yet to be solved are: (1)Choosing appropriate control file (2)Choosing appropriate control value dynamicaly. Thoughts are most welcome. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@259 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: make-controller-check-genericBalbir Singh2008-12-171-16/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch adds support for a dynamical check of controllers and choosing two of them, which are enabled in the kernel. I have given preference to the cpu and memory controller if they exist. I will pass these mounted controllers to the c file(will send implementation in a next patch) and thus the c file will have no hard coding with respect to any controller. The reason of chosing script for this part is 1. easy to implement 2. otherwise there wont be any use of script :) One of my doubts is: Few controllers(e.g. devices) seems not to be having a control file. Please help me in finding the control file for each controller. Any link to documentation? This info I need in the c file. As per my knowledge the control files are: ***************************** controller control_file ***************************** cpu cpu.shares memory memory.linit_in_bytes debug devices ns cpuacct cpuset Also what type of values can be written to those control files? I need to take care before i write something stupid to a control file. Please review the patch and give your valuable comments. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@256 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup3Balbir Singh2008-12-171-5/+5
| | | | | | | | | Hi, This patch does cleanups in test script. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@250 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: change subsyscheck logic in testscriptBalbir Singh2008-12-171-5/+5
| | | | | | | | | | 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
* libcgroup Test: multi-mount-script-enhancedBalbir Singh2008-12-171-53/+151
| | | | | | | | | | | This patch modifies the script to handle multiple mounts. The earlier functions are modified and new ones are added. There is still some hard coding with respect to the number of mountpoints and controllers. I will update this code part once I get an idea of a better design. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@240 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-011-0/+211
libcgroup: framework for libcgroup testcases This Patch creates the basic infrastructure for libcgroup testcases. This patch adds a script which runs the binary(C) file. The script does all the environment setup to run the tests and passes this info to the C file through command line arguments. The binary runs the test cases calling the API's in different environment conditions. The Makefile compiles the test. The top level Makefile.in is edited to support make test make testclean The script runs this binary total 3 times, each time with diff varaible. FS_MOUNTED=0 # cgroup fs not mounted FS_MOUNTED=1 # cgroup fs mounted FS_MOUNTED=2 # cgroup fs mounted at multiple points Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@87 4f4bb910-9a46-0410-90c8-c897d4f1cd53