public inbox for [email protected]
help / color / mirror / Atom feedFrom: Masahiko Sawada <[email protected]>
To: Robert Haas <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus
Date: Mon, 17 Mar 2025 15:01:43 -0700
Message-ID: <CAD21AoCB3CORap1fYVHUiAAuK7t9LGGoYqr1hm-2-LP3DR63uw@mail.gmail.com> (raw)
In-Reply-To: <CA+TgmoYg5e4oznn0XGoJ3+mceG1qe_JJt34rF2JLwvGS5T1hgQ@mail.gmail.com>
References: <[email protected]>
<CA+TgmoYg5e4oznn0XGoJ3+mceG1qe_JJt34rF2JLwvGS5T1hgQ@mail.gmail.com>
On Mon, Mar 17, 2025 at 10:20 AM Robert Haas <[email protected]> wrote:
>
> On Fri, Feb 21, 2025 at 1:20 PM Masahiko Sawada <[email protected]> wrote:
> > pg_upgrade: Preserve default char signedness value from old cluster.
>
> Hi,
>
> I noticed that after running 'meson test --suite setup --suite
> pg_upgrade', the file delete_old_cluster.sh is left behind in the
> source directory, which should not happen. Everything created for the
> tests should be created in the meson directories. I traced the problem
> down to 005_char_signedness.pl. I believe the problem is likely that
> other pg_upgrade TAP tests include this locution, whereas
> 005_char_signedness.pl does not:
>
> # In a VPATH build, we'll be started in the source directory, but we want
> # to run pg_upgrade in the build directory so that any files generated finish
> # in it, like delete_old_cluster.{sh,bat}.
> chdir ${PostgreSQL::Test::Utils::tmp_check};
Thank you for the report.
I've confirmed the issue and attached a patch to fix it.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Attachments:
[application/octet-stream] 0001-Fix-the-test-005_char_signedness.patch (1.4K, 2-0001-Fix-the-test-005_char_signedness.patch)
download | inline diff:
From 6fe1578bcbf7f579869684a71dd463bb2939d82c Mon Sep 17 00:00:00 2001
From: Masahiko Sawada <[email protected]>
Date: Mon, 17 Mar 2025 14:52:13 -0700
Subject: [PATCH] Fix the test 005_char_signedness.
pg_upgrade test 003_char_signedness was leaving files like
delete_old_cluster.sh in the source directory for VPATH and meson
builds. The fix is to change the directory to tmp_check before running
the test.
Reported-by: Robert Haas <[email protected]>
Reviewed-by:
Discussion: http://postgr.es/m/CA+TgmoYg5e4oznn0XGoJ3+mceG1qe_JJt34rF2JLwvGS5T1hgQ@mail.gmail.com
---
src/bin/pg_upgrade/t/005_char_signedness.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/bin/pg_upgrade/t/005_char_signedness.pl b/src/bin/pg_upgrade/t/005_char_signedness.pl
index 0190747758c..17fa0d48b15 100644
--- a/src/bin/pg_upgrade/t/005_char_signedness.pl
+++ b/src/bin/pg_upgrade/t/005_char_signedness.pl
@@ -45,6 +45,11 @@ command_like(
qr/Default char data signedness:\s+unsigned/,
'updated default char signedness is unsigned in control file');
+# In a VPATH build, we'll be started in the source directory, but we want
+# to run pg_upgrade in the build directory so that any files generated finish
+# in it, like delete_old_cluster.{sh,bat}.
+chdir ${PostgreSQL::Test::Utils::tmp_check};
+
# Cannot use --set-char-signedness option for upgrading from v18+
command_checks_all(
[
--
2.43.5
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus
In-Reply-To: <CAD21AoCB3CORap1fYVHUiAAuK7t9LGGoYqr1hm-2-LP3DR63uw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox