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 1prFu6-0005e7-QK for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Apr 2023 10:28:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1prFu5-0003Y4-5G for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Apr 2023 10:28:09 +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 1prFu4-0003Xu-2c for pgsql-hackers@lists.postgresql.org; Tue, 25 Apr 2023 10:28:08 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1prFtv-004yCV-HE for pgsql-hackers@postgresql.org; Tue, 25 Apr 2023 10:28:07 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id F28465820F2; Tue, 25 Apr 2023 06:27:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 25 Apr 2023 06:27:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :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=fm3; t= 1682418475; x=1682425675; bh=a1Ls6ThfCJFwpN4f3Gerb2mnQzHdEHIFCNd jZSPc2NQ=; b=AG4Ib7n+mNLrje0P4zszWA04GX1uW88hL0sFbqfS0MT6Y68Q+Xs eAiJ5LU2RI+4xZ1km/+qn6j2sogK8BceJE3kVkksPvqYF5HPAc3pvN12H4uKr56w 62RLJWqdVxbuBADn5wGvAEtPM4DWYRLwUzvGl0ZHW1RJHONLPYbduBXYA3I/41b8 8YXIG/J6dQLm1AIFTASTFjUluowXI+PLokBISvHQhbbNR7e8r8gEQu9iwirGehdU Hs61GWJFGs6FisgiAf6ZkiKJ+z6TB2/o1DLHdJZdHV7rp9T+9JhExNQxbrtzeeRk gqQHTIrB8sEZ0GhnK48TN4cZ6dk2iC3N26A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduvddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Apr 2023 06:27:54 -0400 (EDT) Message-ID: <78d1cfa6-0065-865d-584b-cde6d8c18aff@enterprisedb.com> Date: Tue, 25 Apr 2023 12:27:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: ssl tests aren't concurrency safe due to get_free_port() Content-Language: en-US To: Andrew Dunstan , Andres Freund Cc: pgsql-hackers@postgresql.org, Tom Lane References: <20221002164931.d57hlutrcz4d2zi7@awork3.anarazel.de> <7579f627-aad4-7a04-1a98-033cc6b3cca5@dunslane.net> <52266bf8-bf38-fdfa-9a77-1568f82b63b3@dunslane.net> <0891f64a-d30f-a1b7-9d0c-e447684cd8cd@dunslane.net> <20221105183643.v2nxsac3xlb3eazi@awork3.anarazel.de> <0867ca05-ed3f-09ca-cd41-d7087e542362@dunslane.net> <20221116015105.g6qxu2ugpj6agt26@awork3.anarazel.de> <58de442f-a4fb-3980-85c8-a024ff26c54b@dunslane.net> <20221119201615.uy4rvspdq62oqikn@awork3.anarazel.de> <41ba523e-c867-2c04-3c34-d283a6ba9f7b@dunslane.net> From: Peter Eisentraut In-Reply-To: <41ba523e-c867-2c04-3c34-d283a6ba9f7b@dunslane.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 20.11.22 16:10, Andrew Dunstan wrote: > > On 2022-11-19 Sa 15:16, Andres Freund wrote: >> Hi, >> >> On 2022-11-19 10:56:33 -0500, Andrew Dunstan wrote: >>>> Perhaps we should just export a directory in configure instead of this >>>> guessing game? >>> I think the obvious candidate would be to export top_builddir from >>> src/Makefile.global. That would remove the need to infer it from >>> TESTDATADIR. >> I think that'd be good. I'd perhaps rename it in the process so it's >> exported uppercase, but whatever... >> > > OK, pushed with a little more tweaking. I didn't upcase top_builddir > because the existing prove_installcheck recipes already export it and I > wanted to stay consistent with those. > > If it works ok I will backpatch in couple of days. These patches have affected pgxs-using extensions that have their own TAP tests. The portlock directory is created at my $build_dir = $ENV{top_builddir} || $PostgreSQL::Test::Utils::tmp_check ; $portdir ||= "$build_dir/portlock"; but for a pgxs user, top_builddir points into the installation tree, specifically at $prefix/lib/pgxs/. So when running "make installcheck" for an extension, we either won't have write access to that directory, or if we do, then it's still not good to write into the installation tree during a test suite. A possible fix is diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 5dacc4d838..c493d1a60c 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -464,7 +464,7 @@ rm -rf '$(CURDIR)'/tmp_check && \ $(MKDIR_P) '$(CURDIR)'/tmp_check && \ cd $(srcdir) && \ TESTDIR='$(CURDIR)' PATH="$(bindir):$(CURDIR):$$PATH" \ - PGPORT='6$(DEF_PGPORT)' top_builddir='$(top_builddir)' \ + PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)' \ PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' \ $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) endef