[gvfs/wip/oholy/test-pipe-capacity: 7/7] tests: Increase size for pipes to avoid hangs
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/test-pipe-capacity: 7/7] tests: Increase size for pipes to avoid hangs
- Date: Mon, 10 Feb 2020 14:26:30 +0000 (UTC)
commit 47fd82a50b157a2ac3919bbc9655dd65ff7d8436
Author: Ondrej Holy <oholy redhat com>
Date: Thu Feb 6 15:59:49 2020 +0100
tests: Increase size for pipes to avoid hangs
glib-networking started printing big amount of debug info which cause
test suite hangs. It is because the stdout/stderr is redirected to pipes,
which have limited capacity. Let's increase the pipe capacity to its
maximum to fix this issue.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/issues/451
test/gvfs-test | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 2c37deeb..4361f798 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -1838,6 +1838,12 @@ def start_dbus():
flags = fcntl.fcntl(dbus_daemon.stderr, fcntl.F_GETFL)
fcntl.fcntl(dbus_daemon.stderr, fcntl.F_SETFL, flags | os.O_NONBLOCK)
+ # set maximal size for pipes to avoid hangs when too many debug info is printed
+ F_SETPIPE_SZ = 1031
+ pipe_max_size = int(open('/proc/sys/fs/pipe-max-size', 'r').read())
+ fcntl.fcntl(dbus_daemon.stdout, F_SETPIPE_SZ, pipe_max_size)
+ fcntl.fcntl(dbus_daemon.stderr, F_SETPIPE_SZ, pipe_max_size)
+
return temp_home
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]