Message332936
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. |
|
Date |
User |
Action |
Args |
2019-01-03 17:04:55 | Michael.Felt | set | recipients:
+ Michael.Felt |
2019-01-03 17:04:54 | Michael.Felt | set | messageid: <1546535094.51.0.656750210094.issue35633@roundup.psfhosted.org> |
2019-01-03 17:04:54 | Michael.Felt | link | issue35633 messages |
2019-01-03 17:04:54 | Michael.Felt | create | |
|