bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7319) · python/cpython@63fa8db

@@ -4295,6 +4295,9 @@ def test_closefd(self):

4295429542964296

class 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

42994302

def _test_ignore(cls, conn):

43004303

def handler(signum, frame):

@@ -4303,7 +4306,7 @@ def handler(signum, frame):

43034306

conn.send('ready')

43044307

x = conn.recv()

43054308

conn.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')

43094312

def test_ignore(self):

@@ -4322,7 +4325,7 @@ def test_ignore(self):

43224325

self.assertEqual(conn.recv(), 1234)

43234326

time.sleep(0.1)

43244327

os.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)

43264329

time.sleep(0.1)

43274330

p.join()

43284331

finally: