Skip to content

Commit 7e618f3

Browse files
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. https://bugs.python.org/issue35633 (cherry picked from commit b94d4be) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
1 parent e208935 commit 7e618f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎Lib/test/eintrdata/eintr_tester.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import faulthandler
1313
import fcntl
1414
import os
15+
import platform
1516
import select
1617
import signal
1718
import socket
@@ -518,6 +519,9 @@ def _lock(self, lock_func, lock_name):
518519
self.stop_alarm()
519520
proc.wait()
520521

522+
# Issue 35633: See https://bugs.python.org/issue35633#msg333662
523+
# skip test rather than accept PermissionError from all platforms
524+
@unittest.skipIf(platform.system() == "AIX", "AIX returns PermissionError")
521525
def test_lockf(self):
522526
self._lock(fcntl.lockf, "lockf")
523527

0 commit comments

Comments
 (0)