From 4f1301efe29a3a37470d10a4bb6a497f2e532be5 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Tue, 1 Jul 2008 14:00:25 +0000 Subject: From: Sudhir Kumar 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 Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@92 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- tests/libcgrouptest.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/libcgrouptest.h') diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h index 9d3da5d..55c94df 100644 --- a/tests/libcgrouptest.h +++ b/tests/libcgrouptest.h @@ -41,10 +41,24 @@ enum controller_t { /* Add new controllers here */ }; +enum cgroup_control_val_t { + BOOL, + INT64, + UINT64, + STRING, +}; + +int64_t val_int64; +u_int64_t val_uint64; +bool val_bool; +/* Doubt: size of following string. is'nt this wrong ?*/ +char val_string[FILENAME_MAX]; /* string value of control parameter */ + void get_controllers(char *name, int *exist); static int group_exist(char *path_group); static int set_controller(int controller, char *controller_name, char *control_file, char *control_val, char *value); +static int group_modified(char *path_control_file, int value_type); static inline pid_t cgrouptest_gettid() { -- cgit