Skip to content

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

Merged
merged 4 commits into from
Apr 17, 2019

Conversation

LihuaZhao
Copy link
Contributor

@LihuaZhao LihuaZhao commented Apr 8, 2019

Skip setting RLIMIT_FSIZE and RLIMIT_CPU test case for VxWorks

https://bugs.python.org/issue31904

@@ -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:
Copy link
Member

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.

@LihuaZhao
Copy link
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

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
Copy link
Member

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.

@@ -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.
Copy link
Member

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.

Suggested change
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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@LihuaZhao
Copy link
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@vstinner: please review the changes made to this pull request.

@vstinner vstinner merged commit 693c104 into python:master Apr 17, 2019
@pxinwr pxinwr deleted the fix-resource-limite branch July 12, 2021 09:40
@kuhlenough kuhlenough mannequin mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants