X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-path.c;h=4f9f5c1344b2e718eba31b8d3260f45f14c260f5;hb=d27efd93841a2ac2127fd53321368cc3f975c564;hp=18fcb575e69ad7d41bbbb783921759c2f5414390;hpb=07aa32e31d82d1239a618e07adedaecd35d96b27;p=elogind.git diff --git a/src/test/test-path.c b/src/test/test-path.c index 18fcb575e..4f9f5c134 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -47,7 +47,7 @@ static int setup_test(Manager **m) { assert_se(manager_startup(tmp, NULL, NULL) >= 0); STRV_FOREACH(test_path, tests_path) { - rm_rf_dangerous(strappenda("/tmp/test-path_", *test_path), false, true, false); + rm_rf_dangerous(strjoina("/tmp/test-path_", *test_path), false, true, false); } *m = tmp; @@ -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; @@ -201,7 +201,7 @@ static void test_path_directorynotempty(Manager *m) { assert_se(access(test_path, F_OK) < 0); assert_se(mkdir_p(test_path, 0755) >= 0); - assert_se(touch(strappenda(test_path, "test_file")) >= 0); + assert_se(touch(strjoina(test_path, "test_file")) >= 0); check_stop_unlink(m, unit, test_path, NULL); } @@ -248,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++) {