Skip to content

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

# 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.

``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