]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31132: Remove prlimit permission test. (GH-9280)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 13 Sep 2018 22:22:16 +0000 (15:22 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Sep 2018 22:22:16 +0000 (15:22 -0700)
This test is doesn't work when the test process is privledged, which is hard to detect.

https://bugs.python.org/issue34668
(cherry picked from commit 01e0afa994c2e840f85e2de103e72a2c0ddf1b1f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Lib/test/test_resource.py

index cc9c57024dee8e2ac98de38d454437ad645afe47..b405f0169d6ed6d905b72162f3ad3127b0a95b5d 100644 (file)
@@ -148,9 +148,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)