summaryrefslogtreecommitdiff
path: root/src/test/test-path.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-27 15:08:35 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-28 10:47:15 +0200
commit500727c220354b81b68ed6667d9a6f0fafe3ba19 (patch)
tree83278654d64c69e4b1ad7f94616acf9485a48544 /src/test/test-path.c
parent933ab8199d51f25e7dafbaad54d73c80a4d15a1f (diff)
downloadsystemd-500727c220354b81b68ed6667d9a6f0fafe3ba19.tar.gz
test-path: increase timeout
The tests fail in Fedora's koji with a timeout. Let's just bump the timeout: --- stderr --- Failed to connect to system bus: No such file or directory -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-exists.service: Failed to create cgroup /system.slice/kojid.service/path-exists.service: Permission denied path-exists.service: Succeeded. -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-exists.service: Failed to create cgroup /system.slice/kojid.service/path-exists.service: Permission denied path-exists.service: Succeeded. path-exists.path: Succeeded. Failed to connect to system bus: No such file or directory -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-existsglob.service: Failed to create cgroup /system.slice/kojid.service/path-existsglob.service: Permission denied path-existsglob.service: Succeeded. -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-existsglob.service: Failed to create cgroup /system.slice/kojid.service/path-existsglob.service: Permission denied path-existsglob.service: Succeeded. path-existsglob.path: Succeeded. Failed to connect to system bus: No such file or directory -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-changed.service: Failed to create cgroup /system.slice/kojid.service/path-changed.service: Permission denied path-changed.service: Succeeded. -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-changed.service: Failed to create cgroup /system.slice/kojid.service/path-changed.service: Permission denied path-changed.service: Succeeded. path-changed.path: Succeeded. Failed to connect to system bus: No such file or directory -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied path-modified.service: Succeeded. -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied path-modified.service: Succeeded. path-modified.path: Succeeded. Failed to connect to system bus: No such file or directory -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-mycustomunit.service: Failed to create cgroup /system.slice/kojid.service/path-mycustomunit.service: Permission denied path-mycustomunit.service: Succeeded. path-unit.path: Succeeded. Failed to connect to system bus: No such file or directory -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-directorynotempty.service: Failed to create cgroup /system.slice/kojid.service/path-directorynotempty.service: Permission denied path-directorynotempty.service: Succeeded. -.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied path-directorynotempty.service: Failed to create cgroup /system.slice/kojid.service/path-directorynotempty.service: Permission denied path-directorynotempty.service: Failed to attach to cgroup /system.slice/kojid.service/path-directorynotempty.service: No such file or directory path-directorynotempty.service: Failed at step CGROUP spawning /bin/true: No such file or directory path-directorynotempty.service: Main process exited, code=exited, status=219/CGROUP path-directorynotempty.service: Failed with result 'exit-code'. Test timeout when testing path-directorynotempty.path
Diffstat (limited to 'src/test/test-path.c')
-rw-r--r--src/test/test-path.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/test/test-path.c b/src/test/test-path.c
index e8844fd5ef..1075f31bc6 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -79,21 +79,15 @@ static Service *service_for_path(Manager *m, Path *path, const char *service_nam
}
static void check_states(Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
- usec_t ts;
- usec_t timeout = 2 * USEC_PER_SEC;
-
assert_se(m);
assert_se(service);
- ts = now(CLOCK_MONOTONIC);
+ usec_t end = now(CLOCK_MONOTONIC) + 30 * USEC_PER_SEC;
while (path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS ||
path->state != path_state || service->state != service_state) {
- usec_t n;
- int r;
- r = sd_event_run(m->event, 100 * USEC_PER_MSEC);
- assert_se(r >= 0);
+ assert_se(sd_event_run(m->event, 100 * USEC_PER_MSEC) >= 0);
printf("%s: state = %s; result = %s \n",
UNIT(path)->id,
@@ -104,8 +98,7 @@ static void check_states(Manager *m, Path *path, Service *service, PathState pat
service_state_to_string(service->state),
service_result_to_string(service->result));
- n = now(CLOCK_MONOTONIC);
- if (ts + timeout < n) {
+ if (now(CLOCK_MONOTONIC) >= end) {
log_error("Test timeout when testing %s", UNIT(path)->id);
exit(EXIT_FAILURE);
}