mirror of https://github.com/python/cpython
Merge 3.5 (test_eintr)
This commit is contained in:
commit
397c42b8cc
|
@ -66,11 +66,6 @@ class EINTRBaseTest(unittest.TestCase):
|
|||
if hasattr(faulthandler, 'cancel_dump_traceback_later'):
|
||||
faulthandler.cancel_dump_traceback_later()
|
||||
|
||||
@classmethod
|
||||
def _sleep(cls):
|
||||
# default sleep time
|
||||
time.sleep(cls.sleep_time)
|
||||
|
||||
def subprocess(self, *args, **kw):
|
||||
cmd_args = (sys.executable, '-c') + args
|
||||
return subprocess.Popen(cmd_args, **kw)
|
||||
|
@ -382,6 +377,11 @@ class SignalEINTRTest(EINTRBaseTest):
|
|||
@unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
|
||||
'need signal.sigwaitinfo()')
|
||||
def test_sigwaitinfo(self):
|
||||
# Issue #25277: The sleep is a weak synchronization between the parent
|
||||
# and the child process. If the sleep is too low, the test hangs on
|
||||
# slow or highly loaded systems.
|
||||
self.sleep_time = 2.0
|
||||
|
||||
signum = signal.SIGUSR1
|
||||
pid = os.getpid()
|
||||
|
||||
|
|
Loading…
Reference in New Issue