From a454d241ef8b08e0984c6efbbd6187d70e32145b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 Nov 2013 21:01:24 +0100 Subject: [PATCH] test: exit early if we would conflict with running user systemd --- src/test/test-sched-prio.c | 2 +- src/test/test-unit-name.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index 1bbe867317f..aee75e81cf1 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -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; } diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 67ccdd42289..bde643ad56a 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -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; }