diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2013-08-29 17:02:23 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2013-08-29 17:02:23 (GMT) |
commit | 74b7408604a8f7c340ee1a13d83c337648c92afe (patch) | |
tree | 74ea262d8cb525c4a282dd7b485171aead93e00f /Lib/test/support | |
parent | 14e461d5b92000ec4e89182fa25ab0d5b5b31234 (diff) | |
parent | 5fd2642adb3874a4e6efc72a0782f4e98e7c6ad0 (diff) | |
download | cpython-74b7408604a8f7c340ee1a13d83c337648c92afe.zip cpython-74b7408604a8f7c340ee1a13d83c337648c92afe.tar.gz cpython-74b7408604a8f7c340ee1a13d83c337648c92afe.tar.bz2 |
Issue #18643: Fix some test_socket failures due to large default socket buffer
sizes.
Diffstat (limited to 'Lib/test/support')
-rw-r--r-- | Lib/test/support/__init__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 02ea298..cfbe4bd 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -602,8 +602,14 @@ IPV6_ENABLED = _is_ipv6_enabled() # Windows limit seems to be around 512 B, and many Unix kernels have a # 64 KiB pipe buffer size or 16 * PAGE_SIZE: take a few megs to be sure. # (see issue #17835 for a discussion of this number). -PIPE_MAX_SIZE = 4 *1024 * 1024 + 1 - +PIPE_MAX_SIZE = 4 * 1024 * 1024 + 1 + +# A constant likely larger than the underlying OS socket buffer size, to make +# writes blocking. +# The socket buffer sizes can usually be tuned system-wide (e.g. through sysctl +# on Linux), or on a per-socket basis (SO_SNDBUF/SO_RCVBUF). See issue #18643 +# for a discussion of this number). +SOCK_MAX_SIZE = 16 * 1024 * 1024 + 1 # decorator for skipping tests on non-IEEE 754 platforms requires_IEEE_754 = unittest.skipUnless( |