Author Michael.Felt
Recipients Michael.Felt
Date 2019-01-03.17:04:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546535094.51.0.656750210094.issue35633@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-01-03 17:04:55Michael.Feltsetrecipients: + Michael.Felt
2019-01-03 17:04:54Michael.Feltsetmessageid: <1546535094.51.0.656750210094.issue35633@roundup.psfhosted.org>
2019-01-03 17:04:54Michael.Feltlinkissue35633 messages
2019-01-03 17:04:54Michael.Feltcreate