Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nISXM-0004ds-8i for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Feb 2022 09:48:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nISXJ-0000VZ-Vk for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Feb 2022 09:48:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nISXJ-0000VQ-MA for pgsql-hackers@lists.postgresql.org; Fri, 11 Feb 2022 09:48:17 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nISXG-0005RX-Vk for pgsql-hackers@lists.postgresql.org; Fri, 11 Feb 2022 09:48:17 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1477:7740:2ba7:5a6b:b200:c4ca]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4Jw81l4hDTz3Dyq; Fri, 11 Feb 2022 10:48:11 +0100 (CET) Date: Fri, 11 Feb 2022 10:48:11 +0100 From: Christoph Berg To: Michael Paquier Cc: pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Add TAP test to automate the equivalent of check_guc Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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]: *** [/<>/build/../src/makefiles/pgxs.mk:457: check] Error 1 00:55:09 make[3]: Leaving directory '/<>/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