summaryrefslogtreecommitdiff
path: root/src/test/test-cgroup-mask.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-cgroup-mask.c')
-rw-r--r--src/test/test-cgroup-mask.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c
index 1e59bb02bb..90e2cc8edb 100644
--- a/src/test/test-cgroup-mask.c
+++ b/src/test/test-cgroup-mask.c
@@ -53,16 +53,11 @@ static int test_cgroup_mask(void) {
assert_se(manager_startup(m, serial, fdset) >= 0);
/* Load units and verify hierarchy. */
- assert_se(manager_load_unit(m, "parent.slice", NULL, NULL, &parent) >= 0);
- assert_se(manager_load_unit(m, "son.service", NULL, NULL, &son) >= 0);
- assert_se(manager_load_unit(m, "daughter.service", NULL, NULL, &daughter) >= 0);
- assert_se(manager_load_unit(m, "grandchild.service", NULL, NULL, &grandchild) >= 0);
- assert_se(manager_load_unit(m, "parent-deep.slice", NULL, NULL, &parent_deep) >= 0);
- assert_se(parent->load_state == UNIT_LOADED);
- assert_se(son->load_state == UNIT_LOADED);
- assert_se(daughter->load_state == UNIT_LOADED);
- assert_se(grandchild->load_state == UNIT_LOADED);
- assert_se(parent_deep->load_state == UNIT_LOADED);
+ assert_se(manager_load_startable_unit_or_warn(m, "parent.slice", NULL, &parent) >= 0);
+ assert_se(manager_load_startable_unit_or_warn(m, "son.service", NULL, &son) >= 0);
+ assert_se(manager_load_startable_unit_or_warn(m, "daughter.service", NULL, &daughter) >= 0);
+ assert_se(manager_load_startable_unit_or_warn(m, "grandchild.service", NULL, &grandchild) >= 0);
+ assert_se(manager_load_startable_unit_or_warn(m, "parent-deep.slice", NULL, &parent_deep) >= 0);
assert_se(UNIT_DEREF(son->slice) == parent);
assert_se(UNIT_DEREF(daughter->slice) == parent);
assert_se(UNIT_DEREF(parent_deep->slice) == parent);