From: Dhaval Giani Date: Wed, 13 Aug 2008 10:02:33 +0000 (+0000) Subject: libcgroup: Fix test cases to use new APIs. X-Git-Tag: v0.34~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fe31868a0369e0659872c52c92cf688910593ee;p=thirdparty%2Flibcgroup.git libcgroup: Fix test cases to use new APIs. The APIs changed and we could no longer smoke test the library. Updating it now. Signed-off-by: Dhaval Giani Cc: Sudhir Kumar git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@132 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- diff --git a/tests/libcgrouptest01.c b/tests/libcgrouptest01.c index 72329944..137411fb 100644 --- a/tests/libcgrouptest01.c +++ b/tests/libcgrouptest01.c @@ -539,10 +539,17 @@ struct cgroup *new_cgroup(char *group, char *controller_name, int retval; struct cgroup *newcgroup; struct cgroup_controller *newcontroller; - newcgroup = cgroup_new_cgroup(group, tasks_uid, tasks_gid, - control_uid, control_gid); + newcgroup = cgroup_new_cgroup(group); if (newcgroup) { + retval = cgroup_set_uid_gid(newcgroup, tasks_uid, tasks_gid, + control_uid, control_gid); + + if (retval) { + printf("Test[1:%2d]\tFAIL: cgroup_set_uid_gid()\n", + ++i); + } + newcontroller = cgroup_add_controller(newcgroup, controller_name); if (newcontroller) { switch (value_type) {