chiark / gitweb /
tests: skip tests when executed without privileges but which require them
[elogind.git] / src / test / test-unit-name.c
index 2fa0294882fcd73ee9e03cac41eb2ff0ac648000..6776ef0857716b4e70418e9b8b0b9c9444913ec5 100644 (file)
@@ -124,7 +124,7 @@ static int test_unit_printf(void) {
         assert_se(asprintf(&root_uid, "%d", (int) root->pw_uid) > 0);
 
         r = manager_new(SYSTEMD_USER, false, &m);
-        if (r == -EPERM) {
+        if (r == -EPERM || r == -EACCES) {
                 puts("manager_new: Permission denied. Skipping test.");
                 return EXIT_TEST_SKIP;
         }