]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup Test: fix-newly-broken-test
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:19:22 +0000 (15:19 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:19:22 +0000 (15:19 +0000)
The previous patch creating the function for attach_task() breaks a test case
because of global data usage. This patch fixes that.
(There will be functions corresponding to each API to test all the APIs)

Signed-off-by:  Sudhir Kumar  <skumar@linux.vnet.ibm.com>

git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@269 4f4bb910-9a46-0410-90c8-c897d4f1cd53

tests/libcgrouptest01.c

index a070109453beb81ea11999c1371f85d612da8944..af98d33e65947fd29d7ca0d8bc97fe16a21bd0b3 100644 (file)
@@ -838,9 +838,12 @@ int main(int argc, char *argv[])
                retval = cgroup_modify_cgroup(mod_common_cgroup);
                /* Check if the values are changed */
                if (!retval) {
+                       set_controller(ctl1, controller_name, control_file);
                        build_path(path_control_file, mountpoint,
                                                 "commongroup", control_file);
                        if (!group_modified(path_control_file, STRING)) {
+                               set_controller(ctl2, controller_name,
+                                                                control_file);
                                build_path(path_control_file, mountpoint2,
                                                 "commongroup", control_file);
                                if (!group_modified(path_control_file, STRING)) {