[gvfs/wip/oholy/test-pipe-capacity: 9/9] 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: 9/9] tests: Increase size for pipes to avoid hangs
- Date: Fri, 7 Feb 2020 07:04:17 +0000 (UTC)
commit d757b6879914f98c2eb2b4530b8a1001776d32b8
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]