ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Zbigniew Jędrzejewski-Szmek 35e6dd
From d42b6d20b8565c543547fd0ebde9774a854580f9 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek 35e6dd
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Zbigniew Jędrzejewski-Szmek 35e6dd
Date: Mon, 27 Jul 2020 15:08:35 +0200
Zbigniew Jędrzejewski-Szmek 35e6dd
Subject: [PATCH] test-path: increase timeout
Zbigniew Jędrzejewski-Szmek 35e6dd
Zbigniew Jędrzejewski-Szmek 35e6dd
The tests fail in Fedora's koji with a timeout. Let's just bump
Zbigniew Jędrzejewski-Szmek 35e6dd
the timeout:
Zbigniew Jędrzejewski-Szmek 35e6dd
--- stderr ---
Zbigniew Jędrzejewski-Szmek 35e6dd
Failed to connect to system bus: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-exists.service: Failed to create cgroup /system.slice/kojid.service/path-exists.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-exists.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-exists.service: Failed to create cgroup /system.slice/kojid.service/path-exists.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-exists.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
path-exists.path: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
Failed to connect to system bus: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-existsglob.service: Failed to create cgroup /system.slice/kojid.service/path-existsglob.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-existsglob.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-existsglob.service: Failed to create cgroup /system.slice/kojid.service/path-existsglob.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-existsglob.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
path-existsglob.path: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
Failed to connect to system bus: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-changed.service: Failed to create cgroup /system.slice/kojid.service/path-changed.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-changed.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-changed.service: Failed to create cgroup /system.slice/kojid.service/path-changed.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-changed.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
path-changed.path: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
Failed to connect to system bus: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-modified.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-modified.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
path-modified.path: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
Failed to connect to system bus: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-mycustomunit.service: Failed to create cgroup /system.slice/kojid.service/path-mycustomunit.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-mycustomunit.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
path-unit.path: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
Failed to connect to system bus: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Failed to create cgroup /system.slice/kojid.service/path-directorynotempty.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Succeeded.
Zbigniew Jędrzejewski-Szmek 35e6dd
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Failed to create cgroup /system.slice/kojid.service/path-directorynotempty.service: Permission denied
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Failed to attach to cgroup /system.slice/kojid.service/path-directorynotempty.service: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Failed at step CGROUP spawning /bin/true: No such file or directory
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Main process exited, code=exited, status=219/CGROUP
Zbigniew Jędrzejewski-Szmek 35e6dd
path-directorynotempty.service: Failed with result 'exit-code'.
Zbigniew Jędrzejewski-Szmek 35e6dd
Test timeout when testing path-directorynotempty.path
Zbigniew Jędrzejewski-Szmek 35e6dd
---
Zbigniew Jędrzejewski-Szmek 35e6dd
 src/test/test-path.c | 7 ++-----
Zbigniew Jędrzejewski-Szmek 35e6dd
 1 file changed, 2 insertions(+), 5 deletions(-)
Zbigniew Jędrzejewski-Szmek 35e6dd
Zbigniew Jędrzejewski-Szmek 35e6dd
diff --git a/src/test/test-path.c b/src/test/test-path.c
Zbigniew Jędrzejewski-Szmek 35e6dd
index e8844fd5ef..b4fb2479ec 100644
Zbigniew Jędrzejewski-Szmek 35e6dd
--- a/src/test/test-path.c
Zbigniew Jędrzejewski-Szmek 35e6dd
+++ b/src/test/test-path.c
Zbigniew Jędrzejewski-Szmek 35e6dd
@@ -79,13 +79,10 @@ static Service *service_for_path(Manager *m, Path *path, const char *service_nam
Zbigniew Jędrzejewski-Szmek 35e6dd
 }
Zbigniew Jędrzejewski-Szmek 35e6dd
 
Zbigniew Jędrzejewski-Szmek 35e6dd
 static void check_states(Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
Zbigniew Jędrzejewski-Szmek 35e6dd
-        usec_t ts;
Zbigniew Jędrzejewski-Szmek 35e6dd
-        usec_t timeout = 2 * USEC_PER_SEC;
Zbigniew Jędrzejewski-Szmek 35e6dd
-
Zbigniew Jędrzejewski-Szmek 35e6dd
         assert_se(m);
Zbigniew Jędrzejewski-Szmek 35e6dd
         assert_se(service);
Zbigniew Jędrzejewski-Szmek 35e6dd
 
Zbigniew Jędrzejewski-Szmek 35e6dd
-        ts = now(CLOCK_MONOTONIC);
Zbigniew Jędrzejewski-Szmek 35e6dd
+        usec_t ts = now(CLOCK_MONOTONIC);
Zbigniew Jędrzejewski-Szmek 35e6dd
 
Zbigniew Jędrzejewski-Szmek 35e6dd
         while (path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS ||
Zbigniew Jędrzejewski-Szmek 35e6dd
                path->state != path_state || service->state != service_state) {
Zbigniew Jędrzejewski-Szmek 35e6dd
@@ -105,7 +102,7 @@ static void check_states(Manager *m, Path *path, Service *service, PathState pat
Zbigniew Jędrzejewski-Szmek 35e6dd
                                 service_result_to_string(service->result));
Zbigniew Jędrzejewski-Szmek 35e6dd
 
Zbigniew Jędrzejewski-Szmek 35e6dd
                 n = now(CLOCK_MONOTONIC);
Zbigniew Jędrzejewski-Szmek 35e6dd
-                if (ts + timeout < n) {
Zbigniew Jędrzejewski-Szmek 35e6dd
+                if (ts + 30 * USEC_PER_SEC < n) {
Zbigniew Jędrzejewski-Szmek 35e6dd
                         log_error("Test timeout when testing %s", UNIT(path)->id);
Zbigniew Jędrzejewski-Szmek 35e6dd
                         exit(EXIT_FAILURE);
Zbigniew Jędrzejewski-Szmek 35e6dd
                 }