Re: meson: Make test output much more useful on failure (both in CI and locally)

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Nazir Bilal Yavuz" <byavuz81(at)gmail(dot)com>
Cc: "Andres Freund" <andres(at)anarazel(dot)de>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: meson: Make test output much more useful on failure (both in CI and locally)
Date: 2026-02-06 08:44:12
Message-ID: DG7QVVT1F524.2IYU4ICX4GS34@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 3 Feb 2026 at 11:20, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> v2-0001:
>
> This doesn't really read the first 80 lines of the combined diff.
> Lines with more than 1023 characters will be counted and printed as
> multiple lines. I don't think this is a problem but clearing this
> would be helpful. Other than that, it looks good to me.

I was annoyed by this, so I actually fixed it (manually tested by
changing the buffer to 10 bytes). This meant I needed to introduce
DIAG_DETAIL and DIAG_END, like we already had NOTE_DETAIL and NOTE_END.

> v2-0002:
>
> I am just curious if test failure can cause file descriptors not being
> properly closed and then the IPC::Run:run() call will hang
> indefinitely like the pg_ctl case. Other than that, it looks good to
> me.

No, this issue only happens because for the 'pg_ctl restart' process,
its the child postmaster process outlives the pg_ctl process, WHILE
still having the stdout/stderr file descriptor open. As long as all the
subprocesses exit, the file descriptor will be closed by the OS
automatically. So, this problem really only occurs in these daemon
spawning situations. Which for us in practice is only for pg_ctl
start/restart.

Attachment Content-Type Size
v3-0001-pg_regress-Include-diffs-in-output.patch text/x-patch 6.0 KB
v3-0002-perl-tap-Show-failed-command-output.patch text/x-patch 4.1 KB
v3-0003-perl-tap-Show-die-reason-in-TAP-output.patch text/x-patch 2.3 KB
v3-0004-perl-tap-Use-croak-instead-of-die-in-our-perl-hel.patch text/x-patch 18.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryo Matsumura (Fujitsu) 2026-02-06 09:02:46 RE: Concerns regarding code in pgstat_backend.c
Previous Message Thomas Munro 2026-02-06 08:29:51 Re: [PING] fallocate() causes btrfs to never compress postgresql files