summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2008-12-17 15:14:45 +0000
committerBalbir Singh <balbir@linux.vnet.ibm.com>2008-12-17 15:14:45 +0000
commit3c92b2b795c153540fea315427b2fd60bc947541 (patch)
tree7b37956ccc45553d48ebbccb3a27dc02cfb9c0e0 /tests
parentaed9030697e99f35b0c352f74bb0b7b8014d8ccb (diff)
downloadlibcg-3c92b2b795c153540fea315427b2fd60bc947541.tar.gz
libcg-3c92b2b795c153540fea315427b2fd60bc947541.tar.xz
libcg-3c92b2b795c153540fea315427b2fd60bc947541.zip
libcgroup Test: fix-typo-error-in-delete-cgroup
This patch fixes a testcase which was having some typo errors. (libcgroup api cgroup_delete_cgroup() for a common group in multiple mount scenario) Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@260 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests')
-rw-r--r--tests/libcgrouptest01.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/libcgrouptest01.c b/tests/libcgrouptest01.c
index b27b758..5eac509 100644
--- a/tests/libcgrouptest01.c
+++ b/tests/libcgrouptest01.c
@@ -836,6 +836,7 @@ int main(int argc, char *argv[])
* Test12: delete this common cgroup
* Exp outcome: zero return value
*/
+ strncpy(extra, " Called with commongroup. ", SIZE);
retval = cgroup_delete_cgroup(common_cgroup, 1);
if (!retval) {
/* Check if the group is deleted from both dir tree */
@@ -845,24 +846,25 @@ int main(int argc, char *argv[])
build_path(path2_common_group, mountpoint2,
"commongroup", NULL);
if (group_exist(path2_common_group) == -1) {
- strncpy(extra, " group "
+ strncat(extra, " group "
"deleted globally\n", SIZE);
message(++i, PASS, "create_cgroup()",
retval, extra);
} else {
- strncpy(extra, " group not "
+ strncat(extra, " group not "
"deleted globally\n", SIZE);
message(++i, FAIL, "create_cgroup()",
retval, extra);
}
} else {
- strncpy(extra, " group still found in fs\n",
+ strncat(extra, " group still found in fs\n",
SIZE);
- message(++i, FAIL, "create_cgroup()", retval,
+ message(++i, FAIL, "delete_cgroup()", retval,
extra);
}
} else {
- message(++i, FAIL, "create_cgroup()", retval, extra);
+ strncat(extra, "\n", sizeof("\n"));
+ message(++i, FAIL, "delete_cgroup()", retval, extra);
}
strncpy(extra, "\n", SIZE);