Re: [PATCH] Fix TAP tests with recent IPC::Run on Windows

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Andrew Bille <andrewbille(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Fix TAP tests with recent IPC::Run on Windows
Date: 2026-09-25 09:11:19
Message-ID: CAN55FZ3jo+qJXU26OpSWPuKr1T_9Zs7kVA7Gd-uXyHhne2FZQg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, 25 Sept 2026 at 11:59, Andrew Bille <andrewbille(at)gmail(dot)com> wrote:
>
> While running the TAP test suite on Windows with IPC::Run 20260402.0,
> I found a number of failures caused by changes in IPC::Run's Win32
> stream handling.
> There were two distinct symptoms.
> First, IPC::Run now uses binary mode by default on Windows. Text
> captured into Perl scalars therefore retains CRLF, while a number of
> TAP tests expect the previous text-mode behavior. This caused many
> comparisons to fail even though the displayed output looked identical.
> The patch adds ipc_run_text_mode() and uses it for IPC::Run redirects
> whose contents are treated as text by the tests.
> Second, a few tests relied on implicit standard streams. With the
> recent IPC::Run this resulted in failures such as:
>
> psql: error: could not print result table: Bad file descriptor
>
> and, in pg_upgrade tests, child xcopy commands failing to copy
> pg_xact unless stdin was supplied explicitly.
> Those cases now use explicit stream endpoints.
> I tested the patch with the full test suite on Windows using both:
> IPC::Run 20260402.0
> IPC::Run 20231003.0
> Both pass. I also tested the changes on Linux successfully.

I haven't looked at the patches yet but +1 to fixing these problems.

I saw same problems on the macOS [1] and MinGW CI [2] task when we
were using Cirrus. These discussions might help.

[1] https://postgr.es/m/CAN55FZ3VOUSO2ZmBUE9wRNnL9fUQfGv5qWefk_1pWYqgJ1bRSQ%40mail.gmail.com
[2] https://postgr.es/m/CAN55FZ06xanSbJdHe-CurjX_qNuBWZDEvS1kAk36L38YCtZXnw%40mail.gmail.com

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Bille 2026-09-25 09:14:30 Re: [PATCH] Fix TAP tests with recent IPC::Run on Windows
Previous Message Michael Paquier 2026-09-25 09:04:40 Re: BUG: pg_class.relchecks overflow, making table undroppable