[Python-checkins] bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission denied" on AIX (GH-11424)

Miss Islington (bot) webhook-mailer at python.org
Thu Feb 14 13:41:42 EST 2019

commit: 7e618f3154404613cd9774fb8ffb5b48e7233a9e
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-02-14T10:41:37-08:00

bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission denied" on AIX (GH-11424)

[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.

(cherry picked from commit b94d4bed67c60834b1a5a0936b8c13934cf3b872)

Co-authored-by: Michael Felt <aixtools at users.noreply.github.com>

M Lib/test/eintrdata/eintr_tester.py

diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py
index 25c169bde500..5f956b548fc4 100644
--- a/Lib/test/eintrdata/eintr_tester.py
+++ b/Lib/test/eintrdata/eintr_tester.py
@@ -12,6 +12,7 @@
 import faulthandler
 import fcntl
 import os
+import platform
 import select
 import signal
 import socket
@@ -518,6 +519,9 @@ def _lock(self, lock_func, lock_name):
+    # 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")

More information about the Python-checkins mailing list