1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 01:27:11 +03:00

test: exit early if we would conflict with running user systemd

This commit is contained in:
Lennart Poettering 2013-11-19 21:01:24 +01:00
parent 911121a7c8
commit a454d241ef
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
/* prepare the test */
assert_se(set_unit_path(TEST_DIR) >= 0);
r = manager_new(SYSTEMD_USER, false, &m);
if (r == -EPERM || r == -EACCES) {
if (r == -EPERM || r == -EACCES || r == -EADDRINUSE) {
puts("manager_new: Permission denied. Skipping test.");
return EXIT_TEST_SKIP;
}

View File

@ -125,7 +125,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 || r == -EACCES) {
if (r == -EPERM || r == -EACCES || r == -EADDRINUSE) {
puts("manager_new: Permission denied. Skipping test.");
return EXIT_TEST_SKIP;
}