Re: Environment variable to disable diffs file output - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Environment variable to disable diffs file output
Date
Msg-id E936A054-6975-480A-A355-9DB983F88484@yesql.se
Whole thread Raw
In response to Environment variable to disable diffs file output  (Илья Чердаков <i.cherdakov.pg@gmail.com>)
Responses Re: Environment variable to disable diffs file output
List pgsql-hackers
> On 6 Apr 2026, at 09:55, Илья Чердаков <i.cherdakov.pg@gmail.com> wrote:

> I'd like to add a environment variable to the patch to
> disable diff output. Sometimes you have to be creative
> with exploratory testing, modifying test files, etc.,
> and multiple diff outputs can become a nuisance. This
> doesn't change the default behavior, but it does give
> you control over diff output in tests for specific
> scenarios where a large number of failures are expected
> (mass runs or exploratory testing with changing tests).
>
> The env usage and implementation are somewhat similar
> to PG_REGRESS_DIFF_OPTS
>     PG_REGRESS_DISABLE_DIFFS_OUTPUT=1 make check -s.
>
> For now, I suggest to simply disabling it, but I'm also
> considering passing the number of lines to output via env
> or via flag pg_regress instead of completely disabling it.
> Something like
>     PG_REGRESS_DIFFS_NUMBER_LINES_OUTPUT=20 make check
> and then when an error occurs, 20 lines will be output
> instead of the default 80. Setting it to 0 disables
> diffs output.

I'm not sure I entirely understand the problem.  If you expect lots of
failures, but also don't want to see the test failures, what is the use of
running the tests?  Why not run the subset you actually care about and expand
that set as testing fixes bugs/issues?

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Release postmaster working memory context in slotsync worker
Next
From: Peter Geoghegan
Date:
Subject: Re: pg_plan_advice