Lines Matching defs:unit
33 #include "unit.h"
39 char **tests_path = STRV_MAKE("exists", "existsglobFOOBAR", "changed", "modified", "unit",
75 static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, const char *service_name) {
83 assert_se(unit);
87 assert_se(tmp = strreplace(unit->id, ".path", ".service"));
112 log_error("Test timeout when testing %s", unit->id);
117 assert_se(UNIT_VTABLE(unit)->stop(unit) >= 0);
123 Unit *unit = NULL;
127 assert_se(manager_load_unit(m, "path-exists.path", NULL, NULL, &unit) >= 0);
128 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
132 check_stop_unlink(m, unit, test_path, NULL);
137 Unit *unit = NULL;
140 assert_se(manager_load_unit(m, "path-existsglob.path", NULL, NULL, &unit) >= 0);
141 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
145 check_stop_unlink(m, unit, test_path, NULL);
151 Unit *unit = NULL;
157 assert_se(manager_load_unit(m, "path-changed.path", NULL, NULL, &unit) >= 0);
158 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
164 check_stop_unlink(m, unit, test_path, NULL);
170 Unit *unit = NULL;
176 assert_se(manager_load_unit(m, "path-modified.path", NULL, NULL, &unit) >= 0);
177 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
183 check_stop_unlink(m, unit, test_path, NULL);
188 Unit *unit = NULL;
192 assert_se(manager_load_unit(m, "path-unit.path", NULL, NULL, &unit) >= 0);
193 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
197 check_stop_unlink(m, unit, test_path, "path-mycustomunit.service");
202 Unit *unit = NULL;
208 assert_se(manager_load_unit(m, "path-directorynotempty.path", NULL, NULL, &unit) >= 0);
209 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
217 check_stop_unlink(m, unit, test_path, NULL);
222 Unit *unit = NULL;
229 assert_se(manager_load_unit(m, "path-makedirectory.path", NULL, NULL, &unit) >= 0);
230 assert_se(UNIT_VTABLE(unit)->start(unit) >= 0);
241 assert_se(UNIT_VTABLE(unit)->stop(unit) >= 0);