summaryrefslogtreecommitdiffstats
path: root/tests/libcgrouptest.h
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2009-01-09 16:23:01 +0000
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-01-09 16:23:01 +0000
commit8b53bf5107f1e7540e91972b2bebf8484fa43fa5 (patch)
tree95a965d946d10877ad40494d640fcdf5931c34bd /tests/libcgrouptest.h
parenta6fd09eca79d1626bba110fb2dc77c00a8eddf24 (diff)
downloadlibcg-8b53bf5107f1e7540e91972b2bebf8484fa43fa5.tar.gz
libcg-8b53bf5107f1e7540e91972b2bebf8484fa43fa5.tar.xz
libcg-8b53bf5107f1e7540e91972b2bebf8484fa43fa5.zip
libcgrouptest: Move functions into a new file to reuse
From: Sudhir Kumar <skumar@linux.vnet.ibm.com> There were some coding style warnings that have been fixed in this patch. Basicaly the ones reported by checkpatch.pl This patch puts the test functions in a separate file so that they can be reused for further testing. Some of the functions were static and hence changed to be non static. It also edits the Makefile so that the patch compiles. 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@309 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r--tests/libcgrouptest.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h
index b436568..62f0c68 100644
--- a/tests/libcgrouptest.h
+++ b/tests/libcgrouptest.h
@@ -127,26 +127,23 @@ void test_cgroup_get_cgroup(int ctl1, int ctl2, struct uid_gid_t ids, int i);
void test_cgroup_compare_cgroup(int ctl1, int ctl2, int i);
void test_cgroup_add_free_controller(int i);
void get_controllers(const char *name, int *exist);
-static int group_exist(char *path_group);
-static int set_controller(int controller, char *controller_name,
+int group_exist(char *path_group);
+int set_controller(int controller, char *controller_name,
char *control_file);
-static int group_modified(char *path_control_file, int value_type,
+int group_modified(char *path_control_file, int value_type,
struct cntl_val_t cval);
-static int add_control_value(struct cgroup_controller *newcontroller,
+int add_control_value(struct cgroup_controller *newcontroller,
char *control_file, char *wr, int value_type, struct cntl_val_t cval);
struct cgroup *new_cgroup(char *group, char *controller_name,
char *control_file, int value_type, struct cntl_val_t cval,
struct uid_gid_t ids, int i);
int check_fsmounted(int multimnt);
-static int check_task(char *tasksfile);
+int check_task(char *tasksfile);
/* function to print messages in better format */
-static inline void message(int num, int pass, const char *api,
+void message(int num, int pass, const char *api,
int ret, char *extra);
-static inline void build_path(char *target, char *mountpoint,
+void build_path(char *target, char *mountpoint,
const char *group, const char *file);
+pid_t cgrouptest_gettid();
-static inline pid_t cgrouptest_gettid()
-{
- return syscall(__NR_gettid);
-}
#endif