]> granicus.if.org Git - python/commitdiff
bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission denied...
authorMichael Felt <aixtools@users.noreply.github.com>
Thu, 14 Feb 2019 18:22:35 +0000 (19:22 +0100)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 14 Feb 2019 18:22:35 +0000 (10:22 -0800)
[bpo-35633](https://bugs.python.org/issue35633): Fix a test regression introduced with [bpo-35189](https://bugs.python.org/issue35189) (PEP 475: fnctl functions are not retried if interrupted (EINTR)).

Not only a blocking IO error needs to be ignored - permission errors also need to be ignored.

p.s. - iirc as a "test" only correction a NEWS item is not required. If this is not correct - just mention, and I'll add a NEWS blurb.

https://bugs.python.org/issue35633

Lib/test/eintrdata/eintr_tester.py

index 25c169bde5005f5287a9c26a0c90e4c7b603b1bb..5f956b548fc40aa4e757b3cdea0ef405651d86a0 100644 (file)
@@ -12,6 +12,7 @@ import contextlib
 import faulthandler
 import fcntl
 import os
+import platform
 import select
 import signal
 import socket
@@ -518,6 +519,9 @@ class FNTLEINTRTest(EINTRBaseTest):
                 self.stop_alarm()
             proc.wait()
 
+    # Issue 35633: See https://bugs.python.org/issue35633#msg333662
+    # skip test rather than accept PermissionError from all platforms
+    @unittest.skipIf(platform.system() == "AIX", "AIX returns PermissionError")
     def test_lockf(self):
         self._lock(fcntl.lockf, "lockf")