]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgrouptest: Avoid external variables usage
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Fri, 9 Jan 2009 10:19:02 +0000 (10:19 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Fri, 9 Jan 2009 10:19:02 +0000 (10:19 +0000)
commita6fd09eca79d1626bba110fb2dc77c00a8eddf24
treec39945327b1569d4723be8688693978023f04867
parent16dec13a18c4fae5c7cf6441f75bfa354151f1b4
libcgrouptest: Avoid external variables usage

From: Sudhir Kumar <skumar@linux.vnet.ibm.com>

A lack of proper initial thought let me use some variables globaly, which
is not a good idea at all. However fixing this issue at this stage is not
very good from the point that it changes variables for a lot of functions.
But still it has to be done for a better and reusable code. This patch does
that while putting related variables in meaningful structs.
Thanks to Balbir for a good suggestion.

TODO:
Fill these data structures from a configuration file after analyzing
requirements from different test functions.

Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Acked-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/trunk@307 4f4bb910-9a46-0410-90c8-c897d4f1cd53
tests/libcgrouptest.h
tests/libcgrouptest01.c