test-cgroup-util: skip cg hierarchy tests when necessary (#7371)
This commit is contained in:
parent
bb84995789
commit
05d69e0294
|
@ -372,9 +372,14 @@ static void test_is_wanted(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_cg_tests(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();
|
all = cg_all_unified();
|
||||||
assert_se(IN_SET(all, 0, 1));
|
assert_se(IN_SET(all, 0, 1));
|
||||||
|
|
Loading…
Reference in a new issue