diff options
Diffstat (limited to 'tests/libcgrouptest01.c')
-rw-r--r-- | tests/libcgrouptest01.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/libcgrouptest01.c b/tests/libcgrouptest01.c index 0024fa1..454c466 100644 --- a/tests/libcgrouptest01.c +++ b/tests/libcgrouptest01.c @@ -1419,6 +1419,17 @@ void test_cgroup_get_cgroup(int i) else message(i++, FAIL, "get_cgroup()", ret, info[NULLGRP]); + /* Test with invalid name filled cgroup(non existing) */ + cgroup_filled = cgroup_new_cgroup("nogroup"); + if (!cgroup_filled) + message(i++, FAIL, "new_cgroup()", 0, info[NOMESSAGE]); + + ret = cgroup_get_cgroup(cgroup_filled); + if (ret) + message(i++, PASS, "get_cgroup()", ret, info[NOTCRTDGRP]); + else + message(i++, FAIL, "get_cgroup()", ret, info[NOTCRTDGRP]); + /* Test with name filled cgroup */ cgroup_filled = cgroup_new_cgroup("group1"); if (!cgroup_filled) |