Re: pg_upgrade test writes to source directory

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade test writes to source directory
Date: 2022-05-25 07:25:24
Message-ID: Yo3Z5JzHXn7sIe9N@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 25, 2022 at 08:21:26AM +0200, Peter Eisentraut wrote:
> The 002_pg_upgrade.pl test leaves a file delete_old_cluster.sh in the source
> directory. In vpath builds, there shouldn't be any files written to the
> source directory.
>
> Note that the TAP tests run with the source directory as the current
> directory, so this is the result of pg_upgrade leaving its output files in
> the current directory.

Good catch, thanks.

> It looks like an addition of
>
> chdir $ENV{TESTOUTDIR};
>
> could fix it. Please check the patch.

I think that you mean TESTDIR, and not TESTOUTDIR? Doing a chdir at
the beginning of the tests would cause pg_regress to fail as we would
not find anymore the regression schedule in a VPATH build, but it is
possible to chdir before the execution of pg_upgrade, like the
attached.
--
Michael

Attachment Content-Type Size
v2-0001-Run-pg_upgrade-test-in-build-directory.patch text/x-diff 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-05-25 08:11:38 Re: Multi-Master Logical Replication
Previous Message Kyotaro Horiguchi 2022-05-25 07:12:07 Re: fix stats_fetch_consistency value in postgresql.conf.sample