Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>, Andrew Dunstan <andrew@dunslane.net>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-05-14T08:27:28Z
Lists: pgsql-hackers
On Thu, May 12, 2022 at 02:27:30PM +0900, Michael Paquier wrote:
> On Tue, May 10, 2022 at 10:32:55PM -0700, Noah Misch wrote:
> > On Wed, May 11, 2022 at 10:29:44AM +0900, Michael Paquier wrote:
> > > On Mon, May 09, 2022 at 12:18:39PM +0900, Michael Paquier wrote:
> > > > All these fixes lead me to the attached patch.
> > > 
> > > I have applied this stuff as of 7dd3ee5, in time for beta1, and closed
> > > the open item.  One difference is that I've added one backslash
> > > surrounding the double quote at the beginning *and* the end of the
> > > database name in the patch.  However, the original case was different,
> > > with:
> > > - At the beginning of the database name, one backslash before and
> > > after the double quote.
> > > - At the end of the database name, two backslaces before the double
> > > quote and three after the double quote.

Here, you describe differences between test.sh and your rewrite of test.sh.

> > Why did you discontinue testing the longstanding test database name?
> 
> I am not sure what you mean here.

Here, I requested the rationale for the differences you had just described.
You made a choice to stop testing one list of database names and start testing
a different list of database names.  Why?

> Are you saying that the test should
> be changed to prefix each database name by "regression", as it was the
> case in test.sh?  Or do you mean that the backslash/double-quote
> business should only apply to the first database name and not the
> other two, implying that the new generate_db() in 002_pg_upgrade.pl
> had better have a $prefix and a $suffix like it was originally
> written?

No, I wasn't saying any of those.  (Later, I may say one or more of those.)



Commits

  1. Improve and fix some issues in the TAP tests of pg_upgrade

  2. Fix several issues with the TAP tests of pg_upgrade

  3. Make upgradecheck a no-op in MSVC's vcregress.pl

  4. Switch the regression tests of pg_upgrade to use TAP tests

  5. Fix check for PGHOST[ADDR] in pg_upgrade with Windows and temporary paths

  6. Remove REGRESS_OUTPUTDIR environment variable.

  7. Add PostgreSQL::Test::Cluster::config_data()