[issue35633] test_eintr fails on AIX since fcntl functions were modified
Michael Felt
report at bugs.python.org
Thu Jan 3 12:04:54 EST 2019
Michael Felt <aixtools at felt.demon.nl> added the comment:
After reading the PEP I realized it is much simpler. The test is for interrupts that occur at a low-level - and not for permission issues. The test is failing because there is a permission issue, not a missed interrupt issue. Modifying the code to: (see line 510)
+506 try:
+507 lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
+508 lock_func(f, fcntl.LOCK_UN)
+509 time.sleep(0.01)
+510 except (BlockingIOError, PermissionError):
+511 break
+512 # the child locked the file just a moment ago for 'sleep_time' seconds
+513 # that means that the lock below will block for 'sleep_time' minus some
+514 # potential context switch delay
+515 lock_func(f, fcntl.LOCK_EX)
+516 dt = time.monotonic() - start_time
+517 self.assertGreaterEqual(dt, self.sleep_time)
+518 self.stop_alarm()
fixes this.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35633>
_______________________________________
More information about the Python-bugs-list
mailing list