Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v3vRQ-005gol-Ay for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Oct 2025 11:56:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v3vRO-001LL8-DQ for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Oct 2025 11:56:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v3vRN-001LFH-Se for pgsql-hackers@lists.postgresql.org; Wed, 01 Oct 2025 11:56:14 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v3vRJ-0014gT-33 for pgsql-hackers@lists.postgresql.org; Wed, 01 Oct 2025 11:56:14 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id BD093EC01BD; Wed, 1 Oct 2025 07:56:08 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 01 Oct 2025 07:56:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burd.me; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1759319768; x=1759406168; bh=krb8QMFJcEhPpVLWsaepWlGLjYZlZYRS5lgyTQ6Bec8=; b= gRQBnD3F4YA5HrlgVHONhePbc7HxrzMuqDwhILrWANazEFUAggzgX39OjTSqq/jT 2+udS/+AFarh14H3Ddw+d3sxos60vNNZu0K6f+xJ/NN7wWPdCCgkB/Ef8r8NFKbO 62kzj3L/YqAmU4KbUw9muw0R7dYUQfVeIJ9e0i6iyeYFq1tn0IQSYivNKjr7u5ko KHw07GjKm0qMgvaLC2m7DhtqRzbwK0CvOrghkjnLZbpA8KxzdbaR+agRfIde6Cqb YrYSBsBWTXMKhyToF6sf3hcK3rmZZs1wfowWWX2DL9x8ODB1O9nAyMlDEwvigG7y RlzcfSBOu3Rd/C92GGA0TA== 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:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1759319768; x= 1759406168; bh=krb8QMFJcEhPpVLWsaepWlGLjYZlZYRS5lgyTQ6Bec8=; b=Q 9JR69GDw3twAxrAB0hmVONrt7f39iP/qcz1oq/G3g/+D3fDTZpqkkLq1AtrgeHxO suoslJMS8JweFvVOOlQDE4tC1ig5jmws+NIbQfCRDscppMoQ8nL39CXSxmCcz1/J +bNWxoD+VNnfobC2XSO+AXFlNbMPCiN8Nr7Y5rFd5nOKVgit1BnygBsEL8nZVkc9 bhypo1RfGpJ82S4CiqTL0ipAa18JYS0BdBw+P1p9mxaKeWkF0VHmyhKhP1cgxQIK 6IFT3zBNjfQv48pf2l8++VzMmFQfe2ScNkgJH9h6MKMGqa5mZxkXXgwkU0FoWUnV jUNKgDaNtwwVOJ+xj0wTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdekfedtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefkjghfuffogggtgfgusehtjehmtdertdejnecuhfhrohhmpefirhgvghcu uehurhguuceoghhrvghgsegsuhhrugdrmhgvqeenucggtffrrghtthgvrhhnpefhvdffhf eugeeutefhiefggfelvdeileevffevtdevueelvdegleeuvddtteeutdenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghhrvghgsegsuhhrugdrmhgvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmihgthhgrvghlsehprghquh hivghrrdighiiipdhrtghpthhtohepughgrhhofihlvgihmhhlsehgmhgrihhlrdgtohhm pdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvg hsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i675e48f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Oct 2025 07:56:08 -0400 (EDT) Date: Wed, 1 Oct 2025 07:56:07 -0400 From: Greg Burd To: Michael Paquier , David Rowley Cc: PostgreSQL Hackers Message-ID: <1D456624-470D-43C9-B59D-F487C35E0988@greg.burd.me> In-Reply-To: References: Subject: Re: [PATCH] Add tests for Bitmapset X-Mailer: Mailspring MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Oct 1 2025, at 1:14 am, Michael Paquier wrote: > On Wed, Oct 01, 2025 at 06:00:59PM +1300, David Rowley wrote: >> I didn't look at the coverage report, but on thinking about it, >> test_bitmapset.c's "PG_RETURN_NULL(); /* invalid input */" won't be >> covered as I stripped out all the tests which purposefully pass >> invalid input. You may not want it that way if you're keen to keep the >> coverage of the test module high as well as bitmapset.c > > Yes, that's something I was just going through, with a result pretty > close to what you have sent, including the removal and replacement of > most of tests that were specific to the test module. The prev/next > member coverage is still looking OK from here, though. > > Thanks for the typos, I've missed these. > -- > Michael Michael, David, Thank you. :) The coverage[1] looks to be 100% for everything in bitmapset.c now and 98.6% of the test code[2] for Bitmapset -- more than enough and much better than before. I do like the cleanup/simplification that you two jointly applied. I think it's easier to maintain and reason about and looking at the final result I can see the logic in the simplified approach. I've learned a lot from this exercise not only about Bitmapset and various other areas in the code but also the approach/model for a task like this. I'll keep that in mind going forward. best. -greg [1] https://coverage.postgresql.org/src/backend/nodes/bitmapset.c.gcov.html [2] https://coverage.postgresql.org/src/test/modules/test_bitmapset/test_bitmapset.c.gcov.html