Re: Inconsistent output handling in 002_pg_upgrade.pl test logs

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "daniel(at)yesql(dot)se" <daniel(at)yesql(dot)se>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Inconsistent output handling in 002_pg_upgrade.pl test logs
Date: 2024-10-28 15:44:48
Message-ID: 5fed8e00-e353-49e3-b962-220df7321bbc@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 28, 2024, at 13:44, Daniel Gustafsson wrote:
>> On 28 Oct 2024, at 13:38, Joel Jacobson <joel(at)compiler(dot)org> wrote:
>>
>> Hi hackers,
>>
>> I've noticed some inconsistency in 002_pg_upgrade.pl in how it handles output
>> during test failures. Currently, it uses note to print the header:
>>
>> note "=== contents of $log ===\n";
>>
>> but print for the log content and footer:
>>
>> print slurp_file($log);
>> print "=== EOF ===\n";
>
> Ugh, nice catch.
>
>> Option 1: Keep output together using note
>
>> Option 2: Adjust header message for separate logs
>
>> Thoughts on these options?
>
> I would prefer to output this to the log only and not the TAP output, to avoid
> the risk of not seeing the test output for all the log output on the screen.

I also think that's best, and in line with what we do in other parts of the same script.

Patch attached.

/Joel

Attachment Content-Type Size
0001-Fix-inconsistent-output-handling-in-002_pg_upgrade.p.patch application/octet-stream 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-10-28 15:47:19 Re: pgsql: Implement pg_wal_replay_wait() stored procedure
Previous Message Tomas Vondra 2024-10-28 15:30:26 Re: Avoid possible overflow (src/port/bsearch_arg.c)