-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
gh-95672 skip fcntl when pipesize is smaller than pagesize #102163
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
corona10
merged 13 commits into
python:main
from
hyeongyun0916:test-fcntcl-skip-when-smaller-than-pagesize
Mar 1, 2023
Merged
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a3e90fc
skip fcntl when pipesize is smaller than pagesize
hyeongyun0916 89cc89f
apply review
hyeongyun0916 81a7ac4
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 aa752c6
apply review
hyeongyun0916 f8fb6dd
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 ec6a0cf
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 eea71c3
add get_pagesize to test.support
hyeongyun0916 0464b45
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 ca6a96e
Update Lib/test/support/__init__.py
hyeongyun0916 e14a345
Update Lib/test/support/__init__.py
hyeongyun0916 d5c4006
Update Doc/library/test.rst
hyeongyun0916 60fe601
apply reivew
hyeongyun0916 bf11762
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,7 @@ | |||||
import struct | ||||||
import sys | ||||||
import unittest | ||||||
import resource | ||||||
from test.support import verbose, cpython_only | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
from test.support.import_helper import import_module | ||||||
from test.support.os_helper import TESTFN, unlink | ||||||
|
@@ -201,7 +202,8 @@ def test_fcntl_f_pipesize(self): | |||||
# Get the default pipesize with F_GETPIPE_SZ | ||||||
pipesize_default = fcntl.fcntl(test_pipe_w, fcntl.F_GETPIPE_SZ) | ||||||
pipesize = pipesize_default // 2 # A new value to detect change. | ||||||
if pipesize < 512: # the POSIX minimum | ||||||
pagesize_default = resource.getpagesize() | ||||||
if pipesize < pagesize_default: # the POSIX minimum | ||||||
raise unittest.SkipTest( | ||||||
'default pipesize too small to perform test.') | ||||||
fcntl.fcntl(test_pipe_w, fcntl.F_SETPIPE_SZ, pipesize) | ||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hyeongyun0916 resource module looks like not available on Windows platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a function to the test support.