From 05d69e0294b6bbc7aa348d4fd09bfa847b6e178a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 17 Nov 2017 11:10:21 +0100 Subject: [PATCH] test-cgroup-util: skip cg hierarchy tests when necessary (#7371) --- src/test/test-cgroup-util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 2c22057..0761463 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -372,9 +372,14 @@ static void test_is_wanted(void) { } static void test_cg_tests(void) { - int all, hybrid, systemd; + int all, hybrid, systemd, r; - assert_se(cg_unified_flush() == 0); + r = cg_unified_flush(); + if (r == -ENOMEDIUM) { + log_notice_errno(r, "Skipping cg hierarchy tests: %m"); + return; + } + assert_se(r == 0); all = cg_all_unified(); assert_se(IN_SET(all, 0, 1)); -- 2.7.4