mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
Issue #25122: optimize test_eintr
Fix test_write(): copy support.PIPE_MAX_SIZE bytes, not support.PIPE_MAX_SIZE*3 bytes.
This commit is contained in:
parent
3731bbe8b1
commit
1e0f8ecdd8
1 changed files with 2 additions and 2 deletions
|
@ -144,14 +144,14 @@ class OSEINTRTest(EINTRBaseTest):
|
||||||
# rd closed explicitly by parent
|
# rd closed explicitly by parent
|
||||||
|
|
||||||
# we must write enough data for the write() to block
|
# we must write enough data for the write() to block
|
||||||
data = b"xyz" * support.PIPE_MAX_SIZE
|
data = b"x" * support.PIPE_MAX_SIZE
|
||||||
|
|
||||||
code = '\n'.join((
|
code = '\n'.join((
|
||||||
'import io, os, sys, time',
|
'import io, os, sys, time',
|
||||||
'',
|
'',
|
||||||
'rd = int(sys.argv[1])',
|
'rd = int(sys.argv[1])',
|
||||||
'sleep_time = %r' % self.sleep_time,
|
'sleep_time = %r' % self.sleep_time,
|
||||||
'data = b"xyz" * %s' % support.PIPE_MAX_SIZE,
|
'data = b"x" * %s' % support.PIPE_MAX_SIZE,
|
||||||
'data_len = len(data)',
|
'data_len = len(data)',
|
||||||
'',
|
'',
|
||||||
'# let the parent block on write()',
|
'# let the parent block on write()',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue