Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew@dunslane.net>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-14T08:01:05Z
Lists: pgsql-hackers
On Sat, Feb 12, 2022 at 08:12:42PM -0800, Andres Freund wrote:
> It also doesn't handle @ correctly. Makes sense to fix. Should probably use
> the same logic that libpq, psql, ... use?
>
> if (is_unixsock_path(ch->host))
> ch->type = CHT_UNIX_SOCKET;
>
> that'd basically be the same amount of code. And easier to understand.
So, I am catching up with some parts of this thread, and I have
managed to miss is_unixsock_path(). Except if I am missing something
(now it is close to the end of the day here), a minimal change would
be something like that as we'd still want to allow the use of
localhost and others:
if (value && strlen(value) > 0 &&
/* check for 'local' host values */
(strcmp(value, "localhost") != 0 && strcmp(value, "127.0.0.1") != 0 &&
- strcmp(value, "::1") != 0 && value[0] != '/'))
+ strcmp(value, "::1") != 0 && !is_unixsock_path(value)))
Or perhaps we should restrict more the use of localhost values for
non-WIN32? Opinions?
--
Michael
Commits
-
Improve and fix some issues in the TAP tests of pg_upgrade
- eaa5ebe046c4 15.0 landed
-
Fix several issues with the TAP tests of pg_upgrade
- 7dd3ee508432 15.0 landed
-
Make upgradecheck a no-op in MSVC's vcregress.pl
- d2a2ce4184b0 15.0 landed
-
Switch the regression tests of pg_upgrade to use TAP tests
- 322becb6085c 15.0 landed
-
Fix check for PGHOST[ADDR] in pg_upgrade with Windows and temporary paths
- dc57366c5836 15.0 landed
-
Remove REGRESS_OUTPUTDIR environment variable.
- 7e6124ca7d81 15.0 landed
-
Add PostgreSQL::Test::Cluster::config_data()
- ba15f16107be 15.0 landed