]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup Test: change control value
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:23:16 +0000 (15:23 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:23:16 +0000 (15:23 +0000)
This patch changes the control values to be written to control file.
The write of value 7000000 to memory.limt_in_bytes resulted in a silent
write of 7000064, because of which modify() test case was failing.

Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@278 4f4bb910-9a46-0410-90c8-c897d4f1cd53

tests/libcgrouptest01.c

index 5439d4f55cc4b2bff260fea5a87a41d80418f5e7..07bb54363a43478cc4d96b6d83c5cb4e2cd4e57c 100644 (file)
@@ -649,7 +649,7 @@ int main(int argc, char *argv[])
                 */
                strncpy(group, "ctl2_group1", sizeof(group));
                retval = set_controller(ctl2, controller_name, control_file);
-               strncpy(val_string, "70000000", sizeof(val_string));
+               strncpy(val_string, "7000064", sizeof(val_string));
 
                if (retval) {
                        fprintf(stderr, "Setting controller failled "
@@ -834,7 +834,7 @@ int main(int argc, char *argv[])
                        printf("The cgroup_modify_cgroup() test will fail\n");
                }
 
-               strncpy(val_string, "7000000", sizeof(val_string));
+               strncpy(val_string, "7000064", sizeof(val_string));
                retval = cgroup_add_value_string(sec_controller,
                                                 control_file, val_string);
                if (retval)
@@ -857,7 +857,7 @@ int main(int argc, char *argv[])
                                                                 control_file);
                                build_path(path_control_file, mountpoint2,
                                                 "commongroup", control_file);
-                               strncpy(val_string, "7000000",
+                               strncpy(val_string, "7000064",
                                                         sizeof(val_string));
                                if (!group_modified(path_control_file, STRING)) {
                                        strncat(extra, " group modified under"