]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgroup Test: libcgroup-create-function-for-attach_task-api
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:18:56 +0000 (15:18 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:18:56 +0000 (15:18 +0000)
commit6ce960c88547e643377ce22c02964d9c01d074e3
treefd5eae4a2c6f0d9e1a1f75b7211436a4e36b95c0
parentbf1c1a60f29dc2435bc0029c8f07a88559bfc8fb
libcgroup Test: libcgroup-create-function-for-attach_task-api

This patch creates a function test_cgroup_attach_task() to test the libcgroup
api cgroup_attach_task() 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 test case becomes
thread safe as all the variables are now declared on stack. The other benefit
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@268 4f4bb910-9a46-0410-90c8-c897d4f1cd53
tests/libcgrouptest.h
tests/libcgrouptest01.c