diff options
author | Balbir Singh <balbir@linux.vnet.ibm.com> | 2008-12-17 15:18:23 +0000 |
---|---|---|
committer | Balbir Singh <balbir@linux.vnet.ibm.com> | 2008-12-17 15:18:23 +0000 |
commit | bf1c1a60f29dc2435bc0029c8f07a88559bfc8fb (patch) | |
tree | f6257dd5af173d414bc45535e8983add6d31b03f /tests/libcgrouptest.h | |
parent | def5595456cbf96de855ba8d69c8e46e16f2f9c4 (diff) | |
download | libcg-bf1c1a60f29dc2435bc0029c8f07a88559bfc8fb.tar.gz libcg-bf1c1a60f29dc2435bc0029c8f07a88559bfc8fb.tar.xz libcg-bf1c1a60f29dc2435bc0029c8f07a88559bfc8fb.zip |
libcgroup Test: libcgroup-create-function-for-init-api
This patch creates a function test_cgroup_init() to test the libcgroup api
cgroup_init() under different scenario. In the earlier approach we were not
usong functions and were testing the api sequentialy under different conditions.
The new approach has a single function for 1 api which can handle the testing
under all conditions. The advantage is that the code repetition has reduced now.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@267 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r-- | tests/libcgrouptest.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h index 70f565c..79b065a 100644 --- a/tests/libcgrouptest.h +++ b/tests/libcgrouptest.h @@ -73,6 +73,10 @@ static int i; /* No extra message unless specified */ char extra[SIZE] = "\n"; +/* Functions to test each API */ +void test_cgroup_init(int retcode, int i); +/* API test functions end here */ + void get_controllers(char *name, int *exist); static int group_exist(char *path_group); static int set_controller(int controller, char *controller_name, |