Skip to content

[3.13] gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227) #123421

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

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Lib/test/test_asyncio/test_sendfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,10 @@ async def wait_closed(self):

class SendfileBase:

# 256 KiB plus small unaligned to buffer chunk
# Newer versions of Windows seems to have increased its internal
# buffer and tries to send as much of the data as it can as it
# has some form of buffering for this which is less than 256KiB
# on newer server versions and Windows 11.
# So DATA should be larger than 256 KiB to make this test reliable.
DATA = b"x" * (1024 * 256 + 1)
# Linux >= 6.10 seems buffering up to 17 pages of data.
# So DATA should be large enough to make this test reliable even with a
# 64 KiB page configuration.
DATA = b"x" * (1024 * 17 * 64 + 1)
# Reduce socket buffer size to test on relative small data sets.
BUF_SIZE = 4 * 1024 # 4 KiB

Expand Down
Loading