summaryrefslogtreecommitdiffstats
path: root/tests/libcgrouptest.h
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2008-07-01 14:00:25 +0000
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2008-07-01 14:00:25 +0000
commit4f1301efe29a3a37470d10a4bb6a497f2e532be5 (patch)
tree93d2eab3123cfc63f5a36cbcc7fe9bed6d19a2af /tests/libcgrouptest.h
parent3c0aafb5e5db7f91ce379e43841debcd325cc50e (diff)
downloadlibcg-4f1301efe29a3a37470d10a4bb6a497f2e532be5.tar.gz
libcg-4f1301efe29a3a37470d10a4bb6a497f2e532be5.tar.xz
libcg-4f1301efe29a3a37470d10a4bb6a497f2e532be5.zip
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
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 <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@92 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r--tests/libcgrouptest.h14
1 files changed, 14 insertions, 0 deletions
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()
{