]> granicus.if.org Git - python/commitdiff
bpo-31132: Remove prlimit permission test. (GH-9280)
authorBenjamin Peterson <benjamin@python.org>
Thu, 13 Sep 2018 21:53:09 +0000 (14:53 -0700)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 13 Sep 2018 21:53:09 +0000 (14:53 -0700)
This test is doesn't work when the test process is privledged, which is hard to detect.

https://bugs.python.org/issue34668

Lib/test/test_resource.py

index 4b852789be7e44aa123de4b6bca9902236a62ce2..b07eb73b2aeb71f4f763a848b44df6966d3bd2dc 100644 (file)
@@ -147,9 +147,6 @@ class ResourceTest(unittest.TestCase):
     @support.requires_linux_version(2, 6, 36)
     def test_prlimit(self):
         self.assertRaises(TypeError, resource.prlimit)
-        if os.geteuid() != 0:
-            self.assertRaises(PermissionError, resource.prlimit,
-                              1, resource.RLIMIT_AS)
         self.assertRaises(ProcessLookupError, resource.prlimit,
                           -1, resource.RLIMIT_AS)
         limit = resource.getrlimit(resource.RLIMIT_AS)