chiark / gitweb /
swap: simplify a few things by making use of new LIST_FOREACH_OTHERS macro
[elogind.git] / src / test / test-path.c
index 29b187a42303b5e448c2a1d12e354125f571a46c..1512ae2b195aad753a15b3c70b453893efce9fd8 100644 (file)
@@ -81,7 +81,7 @@ static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, con
         service = SERVICE(service_unit);
 
         ts = now(CLOCK_MONOTONIC);
-        /* We proces events until the service related to the path has been successfully started */
+        /* We process events until the service related to the path has been successfully started */
         while(service->result != SERVICE_SUCCESS || service->state != SERVICE_START) {
                 usec_t n;
                 int r;
@@ -104,7 +104,6 @@ static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, con
         }
 
         assert_se(UNIT_VTABLE(unit)->stop(unit) >= 0);
-        assert_se(UNIT_VTABLE(service_unit)->stop(service_unit) >= 0);
         rm_rf_dangerous(test_path, false, true, false);
 }
 
@@ -249,10 +248,6 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
-        /* It is needed otherwise cgroup creation fails */
-        if (getuid() != 0)
-                return EXIT_TEST_SKIP;
-
         assert_se(set_unit_path(TEST_DIR ":") >= 0);
 
         for (test = tests; test && *test; test++) {