Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permi…
…ssion 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>
  • Loading branch information
aixtools authored and miss-islington committed Feb 14, 2019
commit 78f96a0a57840a72a221153d64fa2495fab23008
4 changes: 4 additions & 0 deletions Lib/test/eintrdata/eintr_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import faulthandler
import fcntl
import os
import platform
import select
import signal
import socket
Expand Down Expand Up @@ -518,6 +519,9 @@ def _lock(self, lock_func, lock_name):
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")

Expand Down