chiark / gitweb /
test: exit early if we would conflict with running user systemd
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Nov 2013 20:01:24 +0000 (21:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Nov 2013 18:37:02 +0000 (19:37 +0100)
src/test/test-sched-prio.c
src/test/test-unit-name.c

index 1bbe867..aee75e8 100644 (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;
         }
index 67ccdd4..bde643a 100644 (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;
         }