summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* libcgroup Test: change test callBalbir Singh2008-12-171-15/+22
| | | | | | | | | | Hi, The api cgroup_modify_cgroup(cgroup1) had to be called before cgroup_modify_cgroup(cgroup2). This patch does that. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@254 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: add warningsBalbir Singh2008-12-171-7/+15
| | | | | | | | | | | Hi, This patch adds some warnings in case some testcses fail. When we modify a group with nullcgroup then there is no need to check if values are changed. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@253 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup4Balbir Singh2008-12-171-85/+176
| | | | | | | | | Hi, This patch does printf and other cleanups in third set of testcases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@252 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: fixed certain rejectsBalbir Singh2008-12-171-3/+3
| | | | | | | | | | The following patch makes certain cleanups for the patchset to apply without any rejects. However the lines of code are being changed in one of the next patches. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@251 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: cleanup2Balbir Singh2008-12-171-58/+86
| | | | | | | | | Hi, This patch does printf and other cleanups in second set of testcases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@249 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: cleanup1Balbir Singh2008-12-172-22/+58
| | | | | | | | | | Hi, This patch does cleanup in first set of testcases. It defines a new function to print test results. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@248 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: libcgrouptest-multimnt-sanitycheckBalbir Singh2008-12-172-5/+22
| | | | | | | | | | | Hi The following patch adds the sanity check in c file for multiple mount case. The parameter passed to the function decides whether the check is for single mount or multiple mount. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@246 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt05Balbir Singh2008-12-171-3/+73
| | | | | | | | | | | | Hi The following patch adds three testcases for libcg apis create and delete _cgroup() and wrapper apis for multiple mount case. The patch creates a valid cgroup structure with two controllers and after calling to apis performs a check under both controllers. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@245 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt04Balbir Singh2008-12-171-0/+44
| | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_delete_cgroup() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The group is checked if it is deleted from the root directory of the corresponding controller's mountpoint. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@244 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt03Balbir Singh2008-12-171-1/+73
| | | | | | | | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_attach_task() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The argument of the api is a valid group under one controller's(say cpu) mountpoint. This group exist only under one controller(cpu). So the attached task is checked under this group for this(cpu) controller and under the root group for the other(memory) controller. In the second call the argument is a group under other controller(memory) and hence now task is checked under the two groups of both controllers. In the third calll we give the argument as a non existing group, so the return value should be ECGROUPNOTEXIST. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@243 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt02Balbir Singh2008-12-171-0/+83
| | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_create_cgroup() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The group is checked if it exists under the root directory of the corresponding controller's mountpoint. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@242 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup Test: libcgrouptest-multimnt01Balbir Singh2008-12-172-24/+53
| | | | | | | | | | | | | This patch adds a testcase for libcgroup API cgroup_attach_task() testing. The API is called under the multimount condition(FS_MOUNTED=2) and return values are checked. The task pid is checked if it exists under the root group's tasks file of both the mountpoints. The patch also puts the common code in a function. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@241 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
* libcgroup: Segfault when we run setuid testcase without argumentDhaval Giani2008-12-141-0/+5
| | | | | | | | | | | | | | | From: "Rishikesh K. Rajak" <risrajak@linux.vnet.ibm.com> In libcgroup testcase "setuid" testcase segfault when we run without uid parameter. This patch fixes the issue. [dhaval@linux.vnet.ibm.com: Minor fixes] Signed-off-by: Rishikesh k Rajak <risrajak@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@235 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* The automatic classification engine (cgexec, cgclassify, pam_cgroup)Balbir Singh2008-09-293-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | classify tasks. It is useful for an application to know where it has been classified. I propose to add a new API cgroup_get_current_controller_path() that returns the current classification directory for the specified controller. One can easily add on and build new API that will return paths of all mounted controllers, but I want to start with something simple and useful. I've also added a bunch of test cases for the same purpose. Test output # ./pathtest.sh Test FAIL, get path failed for controller cpuset Test PASS, controller cpu path /default Test PASS, controller cpuacct path /default Test PASS, controller memory path /default Test FAIL, get path failed for controller memrlimit I mounted just cpu, cpuacct and memory, thus the path for cpuset and memrlimit could not be found (as expected). Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Reviewed-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@200 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge the cgruleseng daemon from Steve OlivieriBalbir Singh2008-09-262-1/+81
| | | | | | | | | | Signed-off-by: Steve Olivieri <sjo@redhat.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@190 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* More fixes to the earlier attempt to create new cgroup inheriting parent'sBalbir Singh2008-08-221-5/+6
| | | | | | | | | | | attributes. Test cases have also been updated. Tested on an x86_64 box with libcg_ba Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@166 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* This patch adds cgroup_create_cgroup_from_parent() API. I've tested itBalbir Singh2008-08-221-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with a modified version of libcg_ba (basic acceptance tests), that I'll send out later. I've also fixed a couple of bugs, I'll list them in order and if desired, I'll split out the patches so that the enhancements can be separate from the bug fixes 1. Fix cg_create_control_group() to succeed if the directory already exists 2. We can't always append a control_file, we need to open it "r+" 3. It's OK for writing values to a control_file to fail, since some of them are read-only and some may not exist in hierarchies below the root 4. Skip over directories while trying to read control file's name value pairs 5. In cg_rd_ctlr_file we don't allocate any memory to value, directly fscanf into it, that's been fixed 6. There might be more fixes that might already be present in trunk, since I hope I've not redone a lot of the fixes, I had branched of trunk very recently Changelog v2 ------------ 1. Refactor cgroup_free_controllers() and use it in cgroup_create_cgroup_from_parent() 2. Check for strdup failure 3. Check if dst == src TODO: 1. Use cg_add_controller() API 2. Use cg_add_value_string() API I'll send out patches for the TODOs later. I've also updated the basic acceptance test (libcg_ba.cpp) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@165 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup testcases: fix small testcase issueDhaval Giani2008-08-151-1/+1
| | | | | | | | | | | | | | From: Sudhir Kumar <skumar@linux.vnet.ibm.com> This patch fixes a small mistake in the testcase where we were comparing string values like integers. 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@161 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix test cases to use new APIs.Dhaval Giani2008-08-131-2/+9
| | | | | | | | | | | | The APIs changed and we could no longer smoke test the library. Updating it now. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@132 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Ensure global data is protectedDhaval Giani2008-07-211-1/+1
| | | | | | | | | | | Add rwlock to ensure access to cg_mount_table is serialized. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@110 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: fix wrong malloc size in testcaseDhaval Giani2008-07-041-1/+1
| | | | | | | | | | | | | | | From: Sudhir Kumar <skumar@linux.vnet.ibm.com> This patch fixes a small mistake in the previous patch for malloc size. Of course the size should not be of the pointer but the structure. 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@98 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix test cases to use CPU controller if availableDhaval Giani2008-07-021-2/+10
| | | | | | | | | | | | | The test cases used the memory controller. This is not a good idea since most distro kernels don't enable it by default. For the moment I'm setting it to use CPU if memory is not found, but in the longer term I am planning to set it to use CPU first and then memory. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@97 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix invalid pid test case.Dhaval Giani2008-07-011-1/+1
| | | | | | | | | | | 0 is a valid PID for cgroup filesystem. It moves the current task into the cgroup. Let's try -1 instead. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@96 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-012-0/+36
| | | | | | | | | | | | | | libcgroup: adds sanity check in libcgroup testcases binary This patch adds a sanity check on cgroup file system info in testcases. If cgroup filesystem is not mounted and script sends the info as mounted, then the binar would have failed. This patch handles that. 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@95 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-011-4/+65
| | | | | | | | | | | | | | | | | | libcgroup: testcases for cgroup_modify_cgroup() This patch adds testcases for libcgroup API cgroup_modify_cgroup() testing. The API is called with filesystem mounted (FS_MOUNTED=1) and return values are checked. The API is first called with the same cgroup(the one which is existing in the file system, and with all the same parameters). The second time it is called with a null cgroup. Third time it is called with a new cgroup having different controller. The filesystem is checked if the values have been modified. 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@94 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-012-65/+86
| | | | | | | | | | | | | | | libcgroup: put common code in a function This patch puts the common code for creating cgroup structure into a function struct cgroup *new_cgroup(). The function uses few global variables which are changed before the function call and takes few variables as arguments. 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@93 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-012-6/+113
| | | | | | | | | | | | | | | | | libcgroup: testcases for wrapper api and cgroup_modify_cgroup() This patch creates a valid cgroup structure to be passed as the parameter for cgroup_modify_cgroup() function and calls this function. The return values are checked and on that basis the test is declared as pass or fail. The patch adds the code that check if the parameter changed reflect in the filesystem. 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@92 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-011-0/+38
| | | | | | | | | | | | | | | | libcgroup: further testcases for create_cgroup() and delete_cgroup() This patch adds testcases for libcgroup API cgroup_create_cgroup() and cgroup_delete_cgroup() testing. The APIs are called under the same but two conditions(FS_MOUNTED=0/1) and return values are checked. The test checks if these APIs can handle a null cgroup and hence passes a nulll cgroup as parameter. 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@91 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-012-2/+199
| | | | | | | | | | | | | | | | | libcgroup: libcgroup testcases for cgroup_attach_task() This patch adds testcases for libcgroup API cgroup_create_cgroup() and cgroup_delete_cgroup() testing. The APIs are called under the same but two conditions(FS_MOUNTED=0/1) and return values are checked. The cgroup is created and freed using the wrapper APIs. Testcases for FS_MOUNTED=2 have to be added. 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@90 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-011-2/+84
| | | | | | | | | | | | | | | | | | | | | libcgroup: libcgroup testcases for cgroup_attach_task() This patch adds 3 testcases for libcgroup API cgroup_attach_task() testing. The API is called under the same but two conditions(FS_MOUNTED=0/1) and return values are checked. For FS_MOUNTED=1 the API is first called without intializing ie without calling cgroup_init(), and then after cg_init(). Each time the null cgroup is passed. The task is checked if it exists under the root group's tasks file. The 4th testcase calls cgroup_attach_task_pid() with an invalid pid. Testcases for FS_MOUNTED=2 have to be added. 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@89 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-011-9/+37
| | | | | | | | | | | | | | libcgroup: libcgroup testcase for cgroup_init() This patch adds total 3 testcases for libcgroup API cgroup_init() testing.The API is called under the same three conditions(FS_MOUNTED=0/1/2) and return values are checked. Testcases for FS_MOUNTED=2 have to be updated and added. 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@88 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-014-1/+333
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Missed some files while trying to commit the test cases to trunk.Dhaval Giani2008-07-011-9/+0
| | | | | | | | | Reverting that change, and trying again. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@86 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <skumar@linux.vnet.ibm.com>Dhaval Giani2008-07-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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@85 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix api.c warnings, include wrapper.c in Makefile. More changes toBalbir Singh2008-05-301-1/+2
| | | | | | | | | | | spec file based on bugzilla input. Removed %makeinstall Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@67 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Add v0.1b tagBalbir Singh2008-05-242-38/+24
| | | | git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@49 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Multiple mount point support. Patches built on top of Dhaval'a patches.Balbir Singh2008-05-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Works for me on my testing. NOTE: The testing is insufficient as we only test cg_control_create_cgroup() and not delete_cgroup() or attach_task(). Sudhir's new test cases should really help Several coding style fixes and changes, enhancements to make the code work. NOTE: Since this is development release -DDEBUG is back in the makefile. Once this is committed, I'll bump up the version to 0.05 if no one objects. Test report ----------- debug log from the library matched cpuacct:cpuacct Found cgroup option rw,relatime,cpuacct, count 0 matched cpu:cpu Found cgroup option rw,relatime,cpu, count 1 tuid 0, tgid 0, cuid 1000, cgid 1000 path is /tmp/container_cpu/database/ path is /tmp/container_cpuacct/database/ NOTE: The database directory was created as expected on both mount points /tmp/container_cpu and /tmp/container_cpuacct balbir@localhost:~/deliverables/nextgen/libcg/branches/balbir/tests$ ls -al /tmp/container_cpuacct/ total 424 drwxrwxrwt 5 root root 0 2008-05-17 21:27 . drwxrwxrwt 32 root root 425984 2008-05-17 21:26 .. drwxr-xr-x 2 root root 0 2008-05-17 17:09 class1 drwxr-xr-x 2 balbir balbir 0 2008-05-17 17:09 class2 -rw-r--r-- 1 root root 0 2008-05-17 17:09 cpuacct.usage drwxr-xr-x 2 balbir balbir 0 2008-05-17 21:27 database -rw-r--r-- 1 root root 0 2008-05-17 17:09 notify_on_release -rw-r--r-- 1 root root 0 2008-05-17 17:09 releasable -rw-r--r-- 1 root root 0 2008-05-17 17:09 release_agent -rwxrwxrwx 1 root root 0 2008-05-17 17:09 tasks balbir@localhost:~/deliverables/nextgen/libcg/branches/balbir/tests$ ls -al /tmp/container_cpu total 424 drwxrwxrwt 5 root root 0 2008-05-17 21:27 . drwxrwxrwt 32 root root 425984 2008-05-17 21:26 .. drwxr-xr-x 2 root root 0 2008-05-17 17:09 class1 drwxr-xr-x 2 balbir balbir 0 2008-05-17 17:09 class2 -rw-r--r-- 1 root root 0 2008-05-17 17:09 cpu.rt_runtime_us -rw-r--r-- 1 root root 0 2008-05-17 17:09 cpu.shares drwxr-xr-x 2 balbir balbir 0 2008-05-17 21:27 database -rw-r--r-- 1 root root 0 2008-05-17 17:09 notify_on_release -rw-r--r-- 1 root root 0 2008-05-17 17:09 releasable -rw-r--r-- 1 root root 0 2008-05-17 17:09 release_agent -rwxrwxrwx 1 root root 0 2008-05-17 21:10 tasks Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@30 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge with Dhaval's branchBalbir Singh2008-05-111-3/+0
| | | | | | | | | Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@26 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* use getgrnam() for groupsBalbir Singh2008-04-161-6/+7
| | | | | | | | | Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@17 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* api.c | 23 +++++++++++++++--------Balbir Singh2008-04-161-1/+1
| | | | | | | | | | | | | | libcg.h | 4 ++-- tests/libcg_ba.cpp | 2 +- Added additional parameters for create and destroy cgroup. Fixed a cg_init segfault (faulty, if-else check) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@15 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Several bug fixes, some API enhancements.Balbir Singh2008-04-112-0/+136
The first basic acceptance test is under development and first prototype is released api.c | 161 +++++++++++++++++++++++++++++++++++++++++++---------- libcg.h | 14 +--- tests/Makefile | 9 ++ tests/libcg_ba.cpp | 127 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 274 insertions(+), 37 deletions(-) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@12 4f4bb910-9a46-0410-90c8-c897d4f1cd53