diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-17 11:10:21 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-17 11:10:21 +0100 |
commit | 05d69e0294b6bbc7aa348d4fd09bfa847b6e178a (patch) | |
tree | e0c6229439d0708509aac38943a79c1c8b5bd4dc /src | |
parent | bb8499578934cf66998ec0b4cf24f5ff1e4df67c (diff) | |
download | systemd-05d69e0294b6bbc7aa348d4fd09bfa847b6e178a.tar.gz |
test-cgroup-util: skip cg hierarchy tests when necessary (#7371)
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test-cgroup-util.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 2c220578a3..0761463067 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)); |