diff --git a/Doc/library/resource.rst b/Doc/library/resource.rst index 2ed15c13673668..3573da7ea2d716 100644 --- a/Doc/library/resource.rst +++ b/Doc/library/resource.rst @@ -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 diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 62c7963fe6999f..e5ece5284cf15b 100644 --- a/Lib/test/test_resource.py +++ b/Lib/test/test_resource.py @@ -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) @@ -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) diff --git a/Misc/NEWS.d/next/Tests/2019-04-08-09-24-36.bpo-31904.ab03ea.rst b/Misc/NEWS.d/next/Tests/2019-04-08-09-24-36.bpo-31904.ab03ea.rst new file mode 100644 index 00000000000000..2b361011abaed6 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-04-08-09-24-36.bpo-31904.ab03ea.rst @@ -0,0 +1 @@ +Port test_resource to VxWorks: skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU.