From ecf51e6656a26574e9ce280e82a000d1ddb60705 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Tue, 17 Nov 2026 10:20:57 +0100 Subject: [PATCH] test: scale pipe relay slack with page size On ppc64le, test_pipeline_writer_relay_lends_only_while_a_producer_waits[True] fails with: AssertionError: assert 1114112 == 1163264 The test leaves a fixed 16 KiB slack, which assumes 4 KiB pages. A pipe frees space one whole page at a time, and ppc64le uses 64 KiB pages, so reading 16 KiB frees no space and the consumer comes up short. Use 4 pages of slack, so 4 KiB-page systems are unchanged. --- tests/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index e34621f16..2e8ece185 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -492,7 +492,7 @@ def test_pipeline_writer_relay_lends_only_while_a_producer_waits(pauses) -> None # first read fits, so the child can then finish. It is also more than the consumer's pipe holds, so part of it is still # in the relay when cmd2 writes after it. payload = b"x" * (2 * capacity + 2 * 65536) - first_read = len(payload) - capacity - 16384 if pauses else len(payload) + first_read = len(payload) - capacity - 4 * os.sysconf("SC_PAGE_SIZE") if pauses else len(payload) received = bytearray() lent = threading.Event() resume = threading.Event()