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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/library/resource.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ this module for those platforms.
``setrlimit`` may also raise :exc:`error` if the underlying system call
fails.

VxWorks only supports setting :data:`RLIMIT_NOFILE`.

.. function:: prlimit(pid, resource[, limits])

Combines :func:`setrlimit` and :func:`getrlimit` in one function and
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def test_args(self):
self.assertRaises(TypeError, resource.setrlimit)
self.assertRaises(TypeError, resource.setrlimit, 42, 42, 42)

@unittest.skipIf(sys.platform == "vxworks",
"setting RLIMIT_FSIZE is not supported on VxWorks")
def test_fsize_ismax(self):
try:
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
Expand Down Expand Up @@ -110,6 +112,8 @@ def test_getrusage(self):
pass

# Issue 6083: Reference counting bug
@unittest.skipIf(sys.platform == "vxworks",
"setting RLIMIT_CPU is not supported on VxWorks")
def test_setrusage_refcount(self):
try:
limits = resource.getrlimit(resource.RLIMIT_CPU)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port test_resource to VxWorks: skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU.