-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-31904: Skip setting RLIMIT_FSIZE and RLIMIT_CPU test case for VxWorks #12719
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
Conversation
set RLIMIT_FSIZE and RLIMIT_CPU
Lib/test/test_resource.py
Outdated
@@ -28,7 +35,8 @@ def test_fsize_ismax(self): | |||
# the number to a C long long and that the conversion doesn't raise | |||
# an error. | |||
self.assertEqual(resource.RLIM_INFINITY, max) | |||
resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max)) | |||
if _support_rlimit_fsize_set: |
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.
Please remove the 2 constants and add a decorator to the function:
@skipIf(sys.platform == "vxworks", "setting RLIMIT_FSIZE is not supported on VxWorks")
And make a similar change for the other function.
I have made the requested changes; please review again. |
Thanks for making the requested changes! : please review the changes made to this pull request. |
@@ -0,0 +1 @@ | |||
Skip setting RLIMIT_FSIZE and RLIMIT_CPU test case for VxWorks |
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.
Please move this NEWS entry to the Misc/NEWS.d/next/Tests/ directory, and mention the name of the fixed test, for example:
Port test_resource to VxWorks: skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU.
Doc/library/resource.rst
Outdated
@@ -76,6 +76,8 @@ this module for those platforms. | |||
``setrlimit`` may also raise :exc:`error` if the underlying system call | |||
fails. | |||
|
|||
VxWorks only support setting RLIMIT_NOFILE and idtype must be P_PID. |
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.
"supports" with a S, no? (I'm not sure, English is not my first language!) Please use :data: to format properly the RLIMIT_NOFILE constant.
VxWorks only support setting RLIMIT_NOFILE and idtype must be P_PID. | |
VxWorks only supports setting :data:`RLIMIT_NOFILE` and idtype must be P_PID. |
I don't understand "idtype must be P_PID": what does it mean? Is it something specific to VxWorks?
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.
Yes, it's VxWorks specific requires.
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 remove that statements for python user doesn't need to care about it.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Skip setting RLIMIT_FSIZE and RLIMIT_CPU test case for VxWorks
https://bugs.python.org/issue31904