Re: Using AF_UNIX sockets always for tests on Windows - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Using AF_UNIX sockets always for tests on Windows
Date
Msg-id 20221202021017.ajhs7up3lte6iupr@awork3.anarazel.de
Whole thread Raw
In response to Re: Using AF_UNIX sockets always for tests on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Using AF_UNIX sockets always for tests on Windows  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Hi,

On 2022-12-01 20:56:18 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2022-12-01 20:30:36 -0500, Tom Lane wrote:
> >> If we remove that, won't we have a whole lot of code that's not
> >> tested at all on any platform, ie all the TCP-socket code?
> 
> > There's some coverage via the auth and ssl tests. But I agree it's an
> > issue. But to me the fix for that seems to be to add a dedicated test for
> > that, rather than relying on windows to test our socket code - that's quite a
> > few separate code paths from the tcp support of other platforms.
> 
> IMO that's not the best way forward, because you'll always have
> nagging questions about whether a single-purpose test covers
> everything that needs coverage.

Still seems better than not having any coverage in our development
environments...


> I think the best place to be in would be to be able to run the whole test
> suite using either TCP or UNIX sockets, on any platform (with stuff like the
> SSL test overriding the choice as needed).

I agree that that's useful. But it seems somewhat independent from the
majority of the proposed changes. To be able to test force-tcp-everywhere we
don't need e.g.  code for setting sspi auth in pg_regress etc - it's afaik
just needed so there's a secure way of running tests at all on windows.

I think 0003 should be "trimmed" to only change the default for
$use_unix_sockets on windows and to remove PG_TEST_USE_UNIX_SOCKETS. Whoever
wants to, can then add a new environment variable to force tap tests to use
tcp.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add LZ4 compression in pg_dump
Next
From: Amin
Date:
Subject: Traversing targetlist to find accessed columns