pgsql: pg_regress: Include diffs in TAP output

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_regress: Include diffs in TAP output
Date: 2026-04-02 12:25:39
Message-ID: E1w8H7C-002bgR-36@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_regress: Include diffs in TAP output

When pg_regress fails it is often tedious to find the actual diffs,
especially in CI where you must navigate a file browser. Emit the first
80 lines of the combined regression.diffs as TAP diagnostics so the
failure reason is visible directly in the test output.

The line limit is across all failing tests in a single pg_regress run to
avoid flooding when a crash causes every subsequent test to fail.

New DIAG_DETAIL / DIAG_END tap output types are added, mirroring the
existing NOTE_DETAIL / NOTE_END pair, so that long diff lines can be
emitted without spurious '#' prefixes on continuation lines.

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/5720ae01436480c1dcdd34ece0c3d83b00844bca

Modified Files
--------------
src/test/regress/pg_regress.c | 93 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 82 insertions(+), 11 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.