Re: Ensure that STDERR is empty during connect_ok

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jacob Champion <pchampion(at)vmware(dot)com>
Subject: Re: Ensure that STDERR is empty during connect_ok
Date: 2022-02-02 15:42:09
Message-ID: B3DF1FFD-D3CC-4558-AE80-57B1EDDFB3D1@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 2 Feb 2022, at 16:01, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2022-Feb-02, Daniel Gustafsson wrote:
>
>> As part of the NSS patchset, quite a few bugs (and NSS quirks) were found by
>> inspecting STDERR in connect_ok and require it to be empty. This is not really
>> NSS specific, and could help find issues in other libraries as well so I
>> propose to apply it regardless of the fate of the NSS patchset.
>>
>> (The change in the SCRAM tests stems from this now making all testruns have the
>> same number of tests. While I prefer to not plan at all and instead run
>> done_testing(), doing that consistently is for another patch, keeping this with
>> the remainder of the suites.)
>
> Since commit 405f32fc4960 we can rely on subtests for this, so perhaps
> we should group all the tests in connect_ok() (including your new one)
> into a subtest; then each connect_ok() calls count as a single test, and
> we can add more tests in it without having to change the callers.

Disclaimer: longer term I would prefer to remove test plan counting like above
and Toms comment downthread. This is just to make this patch more palatable on
the way there.

Making this a subtest in order to not having to change the callers, turns the
patch into the attached. For this we must group the new test with one already
existing test, if we group more into it (which would make more sense) then we
need to change callers as that reduce the testcount across the tree.

This makes the patch smaller, but not more readable IMO (given that we can't
make it fully use subtests), so my preference is still the v1 patch.

Or did I misunderstand you?

--
Daniel Gustafsson https://vmware.com/

Attachment Content-Type Size
v2-0001-Ensure-that-STDERR-is-empty-in-connect_ok-tests.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2022-02-02 15:42:16 Re: Server-side base backup: why superuser, not pg_write_server_files?
Previous Message David G. Johnston 2022-02-02 15:39:03 Re: warn if GUC set to an invalid shared library