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 1nJTeT-00008T-Js for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 05:11:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJTeR-0005JQ-Tq for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 05:11:51 +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 1nJTeQ-0005JH-2k for pgsql-hackers@lists.postgresql.org; Mon, 14 Feb 2022 05:11:51 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJTeN-0001QD-6R for pgsql-hackers@lists.postgresql.org; Mon, 14 Feb 2022 05:11:49 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A9FF632009DB; Mon, 14 Feb 2022 00:11:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 14 Feb 2022 00:11:45 -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=Xma7ui7BinaKbD0qXeY0F8DjxteNbeBmO5CxH5 hQRq0=; b=f7uEZGYYeQEu316vI6pKeB3GNuECMNHoe5xNaRtP4PrDzulypGZ3DY VwzvgQt5ZrwWADKTbMMdPX2VRNrPrw48CgOMKkLDRIUmbwUwHO/r0cp9LN8TUNLk 3UWnEqg58PPW6AA6ppdB1yYofisCRN21oORfA/9SfcExHFnBsJlHHUgcga9Ncdlv sBmUcrCHXDWoqt5r6r0t7LaqQycPQd6dS9s9lb8mcRpSNsR9f5LzvxJQVI5/312W fX8ykEcLyhE8roR/gvHDzGBPeozedkmMpzuYziIRr+xg/2nfX8kruC01VcMfZzMO Ny7Sqxvb+WUgms9CtOJszGKNbhH930Hg== 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=Xma7ui7BinaKbD0qX eY0F8DjxteNbeBmO5CxH5hQRq0=; b=FFkAx9N4ou5mus9l6SxSD1o64/zLjrc/b 0ARyRKaYQr8c04ry3yam2gT9Tq4fZrjomidCZpA8keRuhu7DYr2XPDy0YqYh4LD6 svJ5Ja+cU2RQvKcMGkpIhqnzu4TtjTkDfPT2bOifyMD/BSTndO6dFk2GpwNXyCq4 OASSxWktPkE49MGGM1XJjHR/YiG+6FhmSR1aclY/av0/SuJPJ6PBcnIH5owxNp2d 4WAEf/vaenEvYEh59gvnu8DAceWIe9AzP72WGqwo3aTfCenrU/rx+t6EYppDXfbG ovQ9R2DidyY+xz+DKarZ0Oe1v1PsOEc/zkWic1r5TlsV+7hP1eshA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Feb 2022 00:11:41 -0500 (EST) Date: Mon, 14 Feb 2022 14:11:37 +0900 From: Michael Paquier To: Andres Freund Cc: Tom Lane , 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> <20220212201046.uyc2yootpaguph3o@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="L8XykgM71+yQ7Wv/" Content-Disposition: inline In-Reply-To: <20220212201046.uyc2yootpaguph3o@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --L8XykgM71+yQ7Wv/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Feb 12, 2022 at 12:10:46PM -0800, Andres Freund wrote: > Tap tests currently are always executed in the source directory above t/, as > far as I can tell. So I don't think VPATH/non-VPATH or windows / non-windows > would break using a relative reference from the test dir. That would mean to rely on $ENV{PWD} for this job, as of something like that: -# 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'; +my $rootdir = $ENV{PWD} . "/../../../.."; +my $sample_file = "$rootdir/src/backend/utils/misc/postgresql.conf.sample"; A run through the CI shows that this is working, and it also works with Debian's patch for the config data. I still tend to prefer the readability of a TAP test over the main regression test suite for this facility. Even if we could use the same trick with PG_ABS_SRCDIR, I'd rather not add this kind of dependency with a file in the source tree in src/test/regress/. Do others have any opinions on the matter? -- Michael --L8XykgM71+yQ7Wv/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmIJ5IkACgkQnvQgOdby QH0kxhAAqSiHVZPlg1cV58CV+e7/Ef+7vQCfpP0g89w9DvJbboCZ7y7Av5Fk7UPZ KOvsxuTOtETLSFKwoIfrOkR6hX2IP57HDBiViTY+FUKbM80zwCSCycTCJYgZIBj1 z5JEyNK4RDkeBd72WYIFQ0uk/mmbzA942sbUSmOaAU9+qCNaePDAdCUtp8bAFDFw /wpx/wYKt8uCABlxOS5aJnsBlDgYysaS8Xlo7jWaqe6q3asCQuBDB8Bjns0ACYd8 Vsb/kg6a0S2GH1Z+PqUCqOEwWrWCBNApRPWyWKMvSwbFAcywdMODzh+zCIaZb4su 96ARfdfp5U/a6JhzzBkjjpxdwskPXf9jtrLiYKsVbAuMJOxAzIdlRbClFpC2SRVU 4vTPiuO0QrG9uiR3Sxo3oquRAntbS+BrKlTbcjYg70CKOODYqCweHq+QR1kAPHau nyIrcBRzKrtFPWQUuDDN517cwK+pHalV7LBlLOVuq4zUN20t0upj426/QK8PbTGU OWFdnpysZ3RPcEo8m/IYrFBym97Djy3FjIPr24axYxbIqEun0uqYv1AehCodTkvX GIyE0zpt/ht6CwRiqzGlvMPL+uMkNGEWw6OHJnlhr7EO/kxWtD2LOAXlY4g2ww+s gSaqaR/Vi1AbGPbUw3IDbix8ENFlGMGxRdbrVERl5xM3tzPINRc= =3OO/ -----END PGP SIGNATURE----- --L8XykgM71+yQ7Wv/--