Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-33353: test_asyncio set SO_SNDBUF after connect #7086

Merged
merged 1 commit into from
May 24, 2018
Merged

bpo-33353: test_asyncio set SO_SNDBUF after connect #7086

merged 1 commit into from
May 24, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 24, 2018

bpo-32622, bpo-33353: On macOS, sock.connect() changes (resets?) the
SO_SNDBUF value. So only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

https://bugs.python.org/issue33353

bpo-32622, bpo-33353: On macOS, sock.connect() changes (resets?) the
SO_SNDBUF value. So only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.
@vstinner vstinner merged commit b97de3d into python:master May 24, 2018
@vstinner vstinner deleted the test_asyncio_sndbuf branch May 24, 2018 00:43
vstinner added a commit that referenced this pull request May 24, 2018
* bpo-33353: test_asyncio uses smaller sendfile data (#7083)

bpo-32622, bpo-33353: sendfile() tests of test_asyncio use socket
buffers of 1 kB "to test on relative small data sets". Send only
160 KiB rather 10 MB to make the test much faster.

Shrink also SendfileBase.DATA from 1600 KiB to 160 KiB.

On Linux, 3 test_sock_sendfile_mix_with_regular_send() runs now take
less than 1 second, instead of 18 seconds.

On FreeBSD, the 3 tests didn't hang, but took 3 minutes. Now
the 3 tests pass in less than 1 seconds.

(cherry picked from commit 2932755)

* bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)

bpo-32622, bpo-33353: On macOS, sock.connect() changes the
SO_SNDBUF value. Only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

(cherry picked from commit b97de3d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants