pgsql: perl tap: Show failed command output

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: perl tap: Show failed command output
Date: 2026-04-02 12:25:39
Message-ID: E1w8H7C-002bgT-3C@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

perl tap: Show failed command output

Capture stdout and stderr from command_ok() and command_fails() and emit
them as TAP diagnostics on failure. Output is truncated to the first
and last 30 lines per channel to avoid flooding.

A new helper _diag_command_output() is introduced in Utils.pm so
both functions share the same truncation and formatting logic.

Author: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
Reviewed-by: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Reviewed-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/DFYFWM053WHS.10K8ZPJ605UFK@jeltef.nl

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1402b8d2fc70faa5154cbc26cab8c4ac384880db

Modified Files
--------------
src/bin/pg_ctl/t/001_start_stop.pl | 2 +-
src/test/perl/PostgreSQL/Test/Utils.pm | 53 ++++++++++++++++++++++++++++++----
2 files changed, 48 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message John Naylor 2026-04-02 12:46:16 pgsql: Check for __cpuidex and __get_cpuid_count separately
Previous Message Tomas Vondra 2026-04-02 11:47:43 pgsql: jit: Change the default to off.