X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-execute.c;h=428fd3260035cf59b102af2d4f0545a0ec0932d7;hb=adfe5671ef794099068038dfccbf1eb5134433c8;hp=85deb27f4393abd45530ef3a291941dcd8d0fd57;hpb=281e05b6cb406debe7b290e5aee8eae049671c14;p=elogind.git diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 85deb27f4..428fd3260 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -23,7 +23,6 @@ #include "manager.h" #include "util.h" #include "macro.h" -#include "strv.h" #include "mkdir.h" typedef void (*test_function_t)(Manager *m); @@ -132,6 +131,11 @@ static void test_exec_environment(Manager *m) { test(m, "exec-environment-empty.service", 0, CLD_EXITED); } +static void test_exec_umask(Manager *m) { + test(m, "exec-umask-default.service", 0, CLD_EXITED); + test(m, "exec-umask-0177.service", 0, CLD_EXITED); +} + int main(int argc, char *argv[]) { test_function_t tests[] = { test_exec_workingdirectory, @@ -144,6 +148,7 @@ int main(int argc, char *argv[]) { test_exec_user, test_exec_group, test_exec_environment, + test_exec_umask, NULL, }; test_function_t *test = NULL; @@ -164,7 +169,7 @@ int main(int argc, char *argv[]) { r = manager_new(SYSTEMD_USER, true, &m); if (IN_SET(r, -EPERM, -EACCES, -EADDRINUSE, -EHOSTDOWN, -ENOENT)) { printf("Skipping test: manager_new: %s", strerror(-r)); - return -EXIT_TEST_SKIP; + return EXIT_TEST_SKIP; } assert_se(r >= 0); assert_se(manager_startup(m, NULL, NULL) >= 0);