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 1pHs4i-0002If-9q for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jan 2023 19:56:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHs4f-0004qY-UH for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jan 2023 19:56:49 +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 1pHs4f-0004qP-JT for pgsql-hackers@lists.postgresql.org; Tue, 17 Jan 2023 19:56:49 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHs4d-0008L9-5H for pgsql-hackers@lists.postgresql.org; Tue, 17 Jan 2023 19:56:49 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6A5B25C00D1; Tue, 17 Jan 2023 14:56:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 17 Jan 2023 14:56:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=fm3; t=1673985405; x=1674071805; bh=9CN83OXfFf 8ffM2a2oINUocl/KvD++1EZwJWibvvGiM=; b=YTs6MUa1w90VyEKX/UxzkU9UM8 55pwQGTaHIXGOoBGhvWr6IwOdRT5rNIZJOk2/+2oYrpISSOgalW2XE3LHVe1BqAa yMKQ8ANxOv7K/QaL3xJkiIzTNKByjU2NzBIFPxPi8OAf8ULEOQm+Aemo9SPp6/tO iAKjLVE2hrPWeEezrrN1Nx/vKZNzdoRqTBwr8AjNLsZb8grFRTTeaikBRZ5uazEL nZKJMpffcO45iI9dS8FDA5C/qoZ/PSxteUMlrNFoEBHIaLqS717ocaTsnLeML/dr o1BJfnZKsURnlRMLcZbqBV0C+pJfDFVh4YCpNmEfp9AkREHC69qHD0RL6jgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1673985405; x=1674071805; bh=9CN83OXfFf8ffM2a2oINUocl/KvD ++1EZwJWibvvGiM=; b=WMLUcdp5yXsHxMmSYo5he3X+3yayy1LxFzVcCFCiDF3M moOi5B3aFqdBAV5p9K4In7LZ+h/T3vH3Uc54o9yfx2AqfKrPEmeszRkaZir0ALCW RLkyS4xMpnUukjPSbhDYG8Bg7+4OVrTIblZcuEj/2c5FcnfLnjs8c18NNq3phSjy XMzrQTWyR/lGNyM4UN+Ne6eSbq/3hjIkL1PWq86D3rpNBzzYBeHLzr0u4PJgDPIf Q0tPRVY5hajSu3jMvHKiG0VCvlxjtvcdYX1XR7eFLWk9K9V8qZ0BWljiXvCAWPHe vgXwnTUMwEzWuObnG3l5C7wTG+REUUKV5OV/DAny0Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtiedgudeftdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpedvffefvefhteevffegieetfefhtddvffejvefhueetgeeludehteev udeitedtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Jan 2023 14:56:44 -0500 (EST) Date: Tue, 17 Jan 2023 11:56:42 -0800 From: Andres Freund To: Justin Pryzby Cc: Andrew Dunstan , Thomas Munro , pgsql-hackers@lists.postgresql.org, Noah Misch , Michael Paquier , Anastasia Lubennikova , Tom Lane , Robert Haas , Melanie Plageman , Peter Eisentraut , Daniel Gustafsson , samay sharma Subject: Re: CI and test improvements Message-ID: <20230117195642.vkanrt4yjeanogqr@awork3.anarazel.de> References: <20220828171029.GO2342@telsasoft.com> <20220828212802.r6eymfffrgr3lxxt@awork3.anarazel.de> <20220910200542.GX31833@telsasoft.com> <20221104235412.GE16921@telsasoft.com> <20221105015946.yrxijqb7h4rqhp6d@awork3.anarazel.de> <20221113235303.GA26337@telsasoft.com> <20221121224542.p2zapvyvb7objluw@alap3.anarazel.de> <20221122225744.GF11463@telsasoft.com> <20230104234424.GE3109@telsasoft.com> <20230117173509.GV9837@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230117173509.GV9837@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-01-17 11:35:09 -0600, Justin Pryzby wrote: > The autoconf system runs all tap tests in t/*.pl, but meson requires > enumerating them in ./meson.build. Yes. It was a mistake that we ever used t/*.pl for make. For one, it means that make can't control concurrency meaningfully, due to the varying number of tests run with one prove instance. It's also the only thing that tied us to prove, which is one hell of a buggy mess. > This checks for and finds no missing tests in the current tree: > > $ for pl in `find src contrib -path '*/t/*.pl'`; do base=${pl##*/}; dir=${pl%/*}; meson=${dir%/*}/meson.build; grep "$base" "$meson" >/dev/null || echo "$base is missing from $meson"; done Likely because I do something similar locally. # prep m test --list > /tmp/tests.txt # Check if all tap tests are known to meson for f in $(git ls-files|grep -E '(t|test)/.*.pl$'|sort);do t=$(echo $f|sed -E -e 's/^.*\/([^/]*)\/(t|test)\/(.*)\.pl$/\1\/\3/');grep -q -L $t /tmp/tests.txt |\ | echo $f;done # Check if all regression / isolation tests are known to meson # # Expected to find plpgsql due to extra 'src' directory level, src/test/mb # because it's not run anywhere and sepgsql, because that's not tested yet for d in $(find ~/src/postgresql -type d \( -name sql -or -name specs \) );do t=$(basename $(dirname $d)); grep -q -L $t /tmp/tests.txt || echo $d; done > However, this finds two real problems and one false-positive with > missing regress/isolation tests: Which the above does *not* test for. Good catch. I'll push the fix for those as soon as tests passed on my personal repo. > $ for makefile in `find src contrib -name Makefile`; do for testname in `sed -r '/^(REGRESS|ISOLATION) =/!d; s///; :l; /\\\\$/{s///; N; b l}; s/\n//g' "$makefile"`; do meson=${makefile%/Makefile}/meson.build; grep -Fw "$testname" "$meson" >/dev/null || echo "$testname is missing from $meson"; done; done > guc_privs is missing from src/test/modules/unsafe_tests/meson.build Yep. That got added during the development of the meson port, so it's not too surprising. > oldextversions is missing from contrib/pg_stat_statements/meson.build This one however, is odd. Not sure how that happened. > $(CF_PGP_TESTS) is missing from contrib/pgcrypto/meson.build Assume that's the false positive? > I also tried but failed to write something to warn if "meson test" was > run with a list of tests but without tmp_install. Help wanted. That doesn't even catch the worst case - when there's tmp_install, but it's too old. The proper solution would be to make the creation of tmp_install a dependency of the relevant tests. Unfortunately meson still auto-propages those to dependencies of the 'all' target (for historical reasons), and creating the temp install is too slow on some machines to make that tolerable. I think there's an open PR to change that. Once that's in a released meson version that's in somewhat widespread use, we should change that. The other path forward is to allow running the tests without tmp_install. There's not that much we'd need to allow running directly from the source tree - the biggest thing is a way to load extensions from a list of paths. This option is especially attractive because it'd allow to run individual tests without a fully built sourcetree. No need to build other binaries when you just want to test psql, or more extremely, pg_test_timing. > I propose to put something like this into "SanityCheck". Perhaps we instead could add it as a separate "meson-only" test? Then it'd fail on developer's machines, instead of later in CI. We could pass the test information from the 'tests' array, or it could look at the metadata in meson-info/intro-tests.json Greetings, Andres Freund