pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: broken master regress tests
Date: Tue, 29 Aug 2023 17:54:24 +0200
Message-ID: <20230829155424.bem25upvaefkqqyy@alvherre.pgsql> (raw)
In-Reply-To: <CA+hUKG+VkcevnqLmbZSD4C5hJ3=TQWgMP-th8LqsbNt0TqZfqw@mail.gmail.com>

On 2023-Aug-27, Thomas Munro wrote:

> On Sun, Aug 27, 2023 at 3:03 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> > So it looks so IPC::Run::run is ignore parent environment
> 
> I guess the new initdb template captures lc_messages in
> postgresql.conf, when it runs earlier?  I guess if you put
> $node->append_conf('postgresql.conf', 'lc_messages=C'); into
> src/bin/pg_amcheck/t/003_check.pl then it will work.  I'm not sure
> what the correct fix should be, ie if the template mechanism should
> notice this difference and not use the template, or if tests that
> depend on the message locale should explicitly say so with
> lc_messages=C or similar (why is this the only one?), or ...

So I tried this technique, but it gest old pretty fast: apparently
there's a *ton* of tests that depend on the locale.  I gave up after
patching the first five files, and noticing that in a second run there
another half a dozen failing tests that hadn't failed the first time
around.  (Not sure why this happened.)

So I think injecting --no-locale to the initdb line that creates the
template is a better approach; something like the attached.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/

Attachments:

nolocale.patch (text/x-diff, 1.2K) download diff --git a/meson.build b/meson.build index 8b2b521a01..5422885b0a 100644 --- a/meson.build +++ b/meson.build @@ -3107,7 +3107,7 @@ sys.exit(sp.returncode) ''', test_initdb_template, temp_install_bindir / 'initdb', - '-A', 'trust', '-N', '--no-instructions' + '-A', 'trust', '-N', '--no-instructions', '--no-locale' ], priority: setup_tests_priority - 1, timeout: 300, diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 0b4ca0eb6a..765b60db02 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -425,7 +425,7 @@ ifeq ($(MAKELEVEL),0) $(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1 $(MAKE) -j1 $(if $(CHECKPREP_TOP),-C $(CHECKPREP_TOP),) checkprep >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1 - $(with_temp_install) initdb -A trust -N --no-instructions '$(abs_top_builddir)'/tmp_install/initdb-template >>'$(abs_top_builddir)'/tmp_install/log/initdb-template.log 2>&1 + $(with_temp_install) initdb -A trust -N --no-instructions --no-locale '$(abs_top_builddir)'/tmp_install/initdb-template >>'$(abs_top_builddir)'/tmp_install/log/initdb-template.log 2>&1 endif endif endif

view thread (24+ messages)  latest in thread

Message-ID: <20230829155424.bem25upvaefkqqyy@alvherre.pgsql>
Permalink:  ../20230829155424.bem25upvaefkqqyy@alvherre.pgsql/
Also on:    postgresql.org/message-id/20230829155424.bem25upvaefkqqyy@alvherre.pgsql

 ·  · 

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: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, thomas.munro@gmail.com, pavel.stehule@gmail.com, boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: broken master regress tests
  In-Reply-To: <20230829155424.bem25upvaefkqqyy@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox