]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: Fix invalid pid test case.
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 1 Jul 2008 14:12:07 +0000 (14:12 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 1 Jul 2008 14:12:07 +0000 (14:12 +0000)
0 is a valid PID for cgroup filesystem. It moves the current
task into the cgroup. Let's try -1 instead.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@96 4f4bb910-9a46-0410-90c8-c897d4f1cd53

tests/libcgrouptest01.c

index 2ec63ec108f90e76fcc16755be79078b0d5b3945..80d8951c564b7f7216a5457f465ea9940fad4fd2 100644 (file)
@@ -224,7 +224,7 @@ int main(int argc, char *argv[])
                 * and invalid pid
                 * Exp outcome: error
                 */
-               retval = cgroup_attach_task_pid(nullcgroup, 0);
+               retval = cgroup_attach_task_pid(nullcgroup, -1);
                if (retval != 0)
                        printf("Test[1:%2d]\tPASS: cgroup_attach_task_pid() ret: %d\n",\
                                                                 ++i, retval);