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 1nIgbu-000601-Lm for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Feb 2022 00:49:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nIgbt-0000Vy-Hj for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Feb 2022 00:49:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIgbs-0000Vp-RI for pgsql-hackers@lists.postgresql.org; Sat, 12 Feb 2022 00:49:57 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIgbq-0002ab-4x for pgsql-hackers@lists.postgresql.org; Sat, 12 Feb 2022 00:49:55 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 850393201DBF; Fri, 11 Feb 2022 19:49:52 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 11 Feb 2022 19:49:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=S2dQnYnGkb05Xkj3egl2r/xkDqO7dOOL8wBJPo ysjZM=; b=rCDFj2b/ZG0i+Z9SDuEgpxkD6+DDGNehLy4NnvVp+LSo/qDWFzR5mV SXOUqGrENXYLL1PkJk3ZJdCbrmGodlOj4WYIUpdw6v6HHe8GJefa2Q35cl4AHNEl D6jaSNxeGYjvnRQzeFJxHkN8q1LPRx2XIHgE+vQR5oBomZaOFyEcGRrjyNHiUopz Y+zTmSNvOPj/WBWHhBUzCKQvBgDawnghLuOhUJdyF9KMCb7rEG2Fut5Y+CMn6Bct LAMrU3i1Z6+PHehBUdLJDPbFDUVjJNO5e3EPukAfgT50stfmm/HaWME4Bd6KD+DB SeCFVGFMXwu4Ez8AQ7kp6WEyAgwgc+wA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=S2dQnYnGkb05Xkj3e gl2r/xkDqO7dOOL8wBJPoysjZM=; b=bM1SrBsclAmSG2YNdSqt7EqDVA38wSQZy LHoNL3ivcFIGq5pskW9FI4YKxoGlXRc55QZ3gL/I0CAuRhF10FmR7D528Nm+qF81 ax+srYVnGOyfTmo82tzByNCKvBe0ZL7ZJ1vX+sLx3gb7Tjbh1cL4Jd0/GeRiD6UF E6yPkYZ1LhwSpZL/P0FRjeWfdHglcD4oQ7wMYenO83F1eygQMFaYjZywqWc18wsb Y5HaM1dsie5BL1ZW3gR4U8Cwh8aGBwx+Th3n3IwCSKFPQskRG6zqW3H5RzhafwHW gczQLabPFtfkuao6M7p81bcEyxeFC+pFPLfC69UQguy7MTW9oKVrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrieeggddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Feb 2022 19:49:49 -0500 (EST) Date: Sat, 12 Feb 2022 09:49:47 +0900 From: Michael Paquier To: Tom Lane Cc: Justin Pryzby , Christoph Berg , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Add TAP test to automate the equivalent of check_guc Message-ID: References: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jloCjIh7EWfPwVWw" Content-Disposition: inline In-Reply-To: <2079693.1644600871@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --jloCjIh7EWfPwVWw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 11, 2022 at 12:34:31PM -0500, Tom Lane wrote: > Justin Pryzby writes: >> Or, is it okay to use ABS_SRCDIR? >=20 > 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 --jloCjIh7EWfPwVWw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmIHBCsACgkQnvQgOdby QH2bGQ/6A1Hy8XlblKouCVDJvzDx7pkXMfTaw0NterYim6VIZo9umAuJmlZ1gs7t 1PCjmAbaLE7N7U4aqZrlmVvmQfB5fqlWBKeZ9D10VKKlEMGSI422YzunvoaQUO0h /MbmKs9kx6gETqPL5UnecxvxwA0e645Kqw2DA9YqrRUyI9qvC6FXdtywAVZnfBnV SjgAXmbmUc276skfLtXJ2Hb8T50K5Utr0AFrRKfF40ydvRs2ryxPqXY3qxKZzmAP iqb7sKsh4ZeRg+sELPI3lrSLwlf245rt0VtEq6ZvakrYDl1bY6KE9/9HYinXX6qz p8kON0rPw44ahaYvD4ULH06vkHbBA++2mXNmv2Bk+Jbfy8Z1jWJ+L40sUh0h4QED MXl9jmcSa5T/9qzgMe5BPU7DJKfv0FjtsW8k1sTmJTTE/lQ4nbvwCWnKbl1BS1bT iBQ7cUL+Os0DOtsD9sPX8V2et/D26nEba7A3NP3v3EQHqX6E79Xy/6a0e9HKqzSm q+XFESu79weTAIVIKd6OGFonmXap7GJvweJ7BzNtLrywox6VfXI/IZSnHcdrC59b TsvRwK8rd3/4jlTizf1BnsuzmzjgXUncCA+l21JYlMlxwb/rDAxTWC3ET7WLVU7v BlKvv1Ns1YZjd2yKwU/64th5Hk8mP4hFr/mN0BVHLZsMQ/jttbc= =J4BQ -----END PGP SIGNATURE----- --jloCjIh7EWfPwVWw--