Commit 693c104a authored by Lihua Zhao's avatar Lihua Zhao Committed by Victor Stinner

bpo-31904: Port test_resource to VxWorks (GH-12719)

Skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU on VxWorks.
parent 29545508
......@@ -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
......
......@@ -16,6 +16,8 @@ class ResourceTest(unittest.TestCase):
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)
......@@ -110,6 +112,8 @@ class ResourceTest(unittest.TestCase):
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)
......
Port test_resource to VxWorks: skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment