bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7319) · python/cpython@63fa8db
@@ -4295,6 +4295,9 @@ def test_closefd(self):
4295429542964296class TestIgnoreEINTR(unittest.TestCase):
429742974298+# Sending CONN_MAX_SIZE bytes into a multiprocessing pipe must block
4299+CONN_MAX_SIZE = max(support.PIPE_MAX_SIZE, support.SOCK_MAX_SIZE)
4300+42984301@classmethod
42994302def _test_ignore(cls, conn):
43004303def handler(signum, frame):
@@ -4303,7 +4306,7 @@ def handler(signum, frame):
43034306conn.send('ready')
43044307x = conn.recv()
43054308conn.send(x)
4306-conn.send_bytes(b'x' * support.PIPE_MAX_SIZE)
4309+conn.send_bytes(b'x' * cls.CONN_MAX_SIZE)
4307431043084311@unittest.skipUnless(hasattr(signal, 'SIGUSR1'), 'requires SIGUSR1')
43094312def test_ignore(self):
@@ -4322,7 +4325,7 @@ def test_ignore(self):
43224325self.assertEqual(conn.recv(), 1234)
43234326time.sleep(0.1)
43244327os.kill(p.pid, signal.SIGUSR1)
4325-self.assertEqual(conn.recv_bytes(), b'x' * support.PIPE_MAX_SIZE)
4328+self.assertEqual(conn.recv_bytes(), b'x' * self.CONN_MAX_SIZE)
43264329time.sleep(0.1)
43274330p.join()
43284331finally: