From fdb6596e467c6db777734456341d476328945b63 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 24 Aug 2011 11:39:19 +0200 Subject: [PATCH] tests: Check cgroup_add_controller return value in test_functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Discovered by gcc 4.6 as "warning: variable ‘controller’ set but not used" Signed-off-by: Jan Safranek Acked-by: Dhaval Giani --- tests/test_functions.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_functions.c b/tests/test_functions.c index d9ca88ec..796a2af8 100644 --- a/tests/test_functions.c +++ b/tests/test_functions.c @@ -845,6 +845,12 @@ void test_cgroup_get_cgroup(int ctl1, int ctl2, struct uid_gid_t ids, int i) /* Create under another controller also */ ret = set_controller(ctl2, controller_name, control_file); controller = cgroup_add_controller(cgroup_a, controller_name); + if (controller) + message(i++, PASS, "cgroup_add_controller()", + 0, info[NOMESSAGE]); + else + message(i++, FAIL, "cgroup_add_controller()", + -1, info[NOMESSAGE]); } test_cgroup_create_cgroup(0, cgroup_a, "group_a", 0, 1, 1, 00); -- 2.47.2