pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check availability of module injection_points in TAP tests
Date: Thu, 05 Sep 2024 04:30:43 +0000
Message-ID: <E1sm48o-000CCy-Rq@gemulon.postgresql.org> (raw)

Check availability of module injection_points in TAP tests

This fixes defects with installcheck for TAP tests that expect the
module injection_points to exist in an installation, but the contents of
src/test/modules are not installed by default with installcheck.  This
would cause, for example, failures under installcheck-world for a build
with injection points enabled, when the contents of src/test/modules/
are not installed.

The availability of the module can be done with a scan of
pg_available_extension.  This has been introduced in 2cdcae9da696, and
it is refactored here as a new routine in Cluster.pm.

Tests are changed in different ways depending on what they need:
- The libpq TAP test sets up a node even without injection points, so it
is enough to check that CREATE EXTENSION can be used.  There is no need
for the variable enable_injection_points.
- In test_misc, 006_signal_autovacuum requires a runtime check.
- 041_checkpoint_at_promote in recovery tests and 005_timeouts in
test_misc are updated to use the routine introduced in Cluster.pm.
- test_slru's 001_multixact, injection_points's 001_stats and
modules/gin/ do not require a check as these modules disable
installcheck entirely.

Discussion: https://postgr.es/m/ZtesYQ-WupeAK7xK@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5735521ac2d52485bca673039ba43e2b8cc71cd4

Modified Files
--------------
src/interfaces/libpq/Makefile                      |  2 +-
src/interfaces/libpq/meson.build                   |  1 -
src/interfaces/libpq/t/005_negotiate_encryption.pl |  7 +++++--
src/test/modules/test_misc/t/005_timeouts.pl       |  5 +----
.../modules/test_misc/t/006_signal_autovacuum.pl   |  9 +++++++++
src/test/perl/PostgreSQL/Test/Cluster.pm           | 22 ++++++++++++++++++++++
src/test/recovery/t/041_checkpoint_at_promote.pl   |  5 +----
7 files changed, 39 insertions(+), 12 deletions(-)



Message-ID: <E1sm48o-000CCy-Rq@gemulon.postgresql.org>
Permalink:  ../E1sm48o-000CCy-Rq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sm48o-000CCy-Rq@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Check availability of module injection_points in TAP tests
  In-Reply-To: <E1sm48o-000CCy-Rq@gemulon.postgresql.org>

* 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