pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Add TAP test to automate the equivalent of check_guc
Date: Fri, 11 Feb 2022 10:48:11 +0100
Message-ID: <YgYw25OXV5men8Fj@msg.df7cb.de> (raw)
In-Reply-To: <E1nHbaO-0000MF-RO@gemulon.postgresql.org>
References: <E1nHbaO-0000MF-RO@gemulon.postgresql.org>

Re: Michael Paquier
> Add TAP test to automate the equivalent of check_guc
> 
> src/backend/utils/misc/check_guc is a script that cross-checks the
> consistency of the GUCs with postgresql.conf.sample, making sure that

Hi,

this test is failing at Debian package compile time:

00:55:07 ok 18 - drop tablespace 2
00:55:07 ok 19 - drop tablespace 3
00:55:07 ok 20 - drop tablespace 4
00:55:07 ok
00:55:07 # Looks like your test exited with 2 before it could output anything.
00:55:09 t/003_check_guc.pl ..............
00:55:09 1..3
00:55:09 Dubious, test returned 2 (wstat 512, 0x200)
00:55:09 Failed 3/3 subtests
00:55:09
00:55:09 Test Summary Report
00:55:09 -------------------
00:55:09 t/003_check_guc.pl            (Wstat: 512 Tests: 0 Failed: 0)
00:55:09   Non-zero exit status: 2
00:55:09   Parse errors: Bad plan.  You planned 3 tests but ran 0.
00:55:09 Files=3, Tests=62,  6 wallclock secs ( 0.05 usr  0.01 sys +  3.31 cusr  1.35 csys =  4.72 CPU)
00:55:09 Result: FAIL
00:55:09 make[3]: *** [/<<PKGBUILDDIR>>/build/../src/makefiles/pgxs.mk:457: check] Error 1
00:55:09 make[3]: Leaving directory '/<<PKGBUILDDIR>>/build/src/test/modules/test_misc'

### Starting node "main"
# Running: pg_ctl -w -D /srv/projects/postgresql/pg/master/build/src/test/modules/test_misc/tmp_check/t_003_check_guc_main_data/pgdata -l /srv/projects/postgresql/pg/master/build/src/test/modules/test_misc/tmp_check/log/003_check_guc_main.log -o --cluster-name=main start
waiting for server to start.... done
server started
# Postmaster PID for node "main" is 1432398
Could not open /usr/share/postgresql/15/postgresql.conf.sample: No such file or directory at t/003_check_guc.pl line 47.
### Stopping node "main" using mode immediate


So it's trying to read from /usr/share/postgresql which doesn't exist
yet at build time.

The relevant part of the test is this:

# Find the location of postgresql.conf.sample, based on the information
# provided by pg_config.
my $sample_file =
  $node->config_data('--sharedir') . '/postgresql.conf.sample';


It never caused any problem in the 12+ years we have been doing this,
but Debian is patching pg_config not to be relocatable since we are
installing into /usr/lib/postgresql/NN /usr/share/postgresql/NN, so
not a single prefix.

https://salsa.debian.org/postgresql/postgresql/-/blob/15/debian/patches/50-per-version-dirs.patch

Christoph





view thread (26+ messages)  latest in thread

Message-ID: <YgYw25OXV5men8Fj@msg.df7cb.de>
Permalink:  ../YgYw25OXV5men8Fj@msg.df7cb.de/
Also on:    postgresql.org/message-id/YgYw25OXV5men8Fj@msg.df7cb.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: myon@debian.org, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Add TAP test to automate the equivalent of check_guc
  In-Reply-To: <YgYw25OXV5men8Fj@msg.df7cb.de>
  References: <E1nHbaO-0000MF-RO@gemulon.postgresql.org> <YgYw25OXV5men8Fj@msg.df7cb.de>

* 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