| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
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
|