pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Christoph Berg <myon@debian.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Add TAP test to automate the equivalent of check_guc
Date: Sat, 12 Feb 2022 09:49:47 +0900
Message-ID: <YgcEK0bJhchPk/NS@paquier.xyz> (raw)
In-Reply-To: <2079693.1644600871@sss.pgh.pa.us>
References: <E1nHbaO-0000MF-RO@gemulon.postgresql.org>
	<YgYw25OXV5men8Fj@msg.df7cb.de>
	<2023925.1644591595@sss.pgh.pa.us>
	<20220211153549.GE31460@telsasoft.com>
	<2027230.1644594087@sss.pgh.pa.us>
	<20220211172929.GF31460@telsasoft.com>
	<2079693.1644600871@sss.pgh.pa.us>

On Fri, Feb 11, 2022 at 12:34:31PM -0500, Tom Lane wrote:
> Justin Pryzby <pryzby@telsasoft.com> writes:
>> Or, is it okay to use ABS_SRCDIR?
> 
> Don't see why not --- other tests certainly do.

Another solution would be to rely on TESTDIR, which is always set as
of the Makefile invocations and vcregress.pl, but that's doomed for
VPATH builds as this points to the build directory, not the source
directory so we would not have access to the sample file.  The root
issue here is that we don't have access to top_srcdir when running the
TAP tests, if we want to keep this stuff as a TAP test.

libpq's regress.pl tweaks things by passing down a SRCDIR to take care
of the VPATH problem, but there is nothing in %ENV that points to the
source directory in the context of a TAP test by default, if we cannot
rely on pg_config to find where the sample file is located.  That's
different than this thread, but should we make an effort and expand
the data available here for TAP tests?

Hmm.  Relying on ABS_SRCDIR in the main test suite would be fine,
though.  It also looks that there would be nothing preventing the
addition of the three tests in the TAP test, as of three SQL queries
instead.  These had better be written with one or more CTEs, for
readability, at least, with the inner query reading the contents of
the sample file to grab the list of all the GUCs.

I guess that it would be better to revert the TAP test and rework all
that for the time being, then.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (26+ messages)  latest in thread

Message-ID: <YgcEK0bJhchPk/NS@paquier.xyz>
Permalink:  ../YgcEK0bJhchPk%2FNS@paquier.xyz/
Also on:    postgresql.org/message-id/YgcEK0bJhchPk/NS@paquier.xyz

 · 

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: michael@paquier.xyz, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, myon@debian.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Add TAP test to automate the equivalent of check_guc
  In-Reply-To: <YgcEK0bJhchPk/NS@paquier.xyz>
  References: <E1nHbaO-0000MF-RO@gemulon.postgresql.org> <YgYw25OXV5men8Fj@msg.df7cb.de> <2023925.1644591595@sss.pgh.pa.us> <20220211153549.GE31460@telsasoft.com> <2027230.1644594087@sss.pgh.pa.us> <20220211172929.GF31460@telsasoft.com> <2079693.1644600871@sss.pgh.pa.us> <YgcEK0bJhchPk/NS@paquier.xyz>

* 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