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 1uuXjy-00CD0Z-0y for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 14:48:39 +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 1uuXjw-008F4b-Nl for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 14:48:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uuXjv-008F4T-VT for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 14:48:36 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uuXju-000hAG-28 for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 14:48:35 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 8CFA0EC0367; Fri, 5 Sep 2025 10:48:33 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Fri, 05 Sep 2025 10:48:33 -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=fm1; t=1757083713; x=1757170113; bh=S4lh9XSf47eDcIBOChqhiCVgKD7aq9vyNJjzhC08mRI=; b= p6pvE2iqrFzcRQaW3gIJebm/SiEw3qluvFFmtvOhsLcMBtc/txodpdXWEuApYm+q AJdg+MEn3G9Jo1fxPMS8F0kKoyiEFTKwFhSyHborbPzcp6+CzYQMxpx+gUacJtp1 mdkx9OJMcyphFo4wt0bLY/8Ky2+1pG4YVoBkgFCbTzQ4mOsbDG9J7SdPJh4tPNYk V1fCR2a5FrV38HXMyvm4iOsArhyyPNS01OBRnktmkwreZqn72Mcy/Zm5/HRcCRrH KWsAz8tuKtCrf9/TZlmuUXxKh7ormWZXWzI7Nxn5aqOqNnxjhR/+9ctdNGQAD3BM PS21BBknOx3i0Sw2jly/Yw== 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=fm1; t=1757083713; x= 1757170113; bh=S4lh9XSf47eDcIBOChqhiCVgKD7aq9vyNJjzhC08mRI=; b=j Ia0SCEk1qtlCF3XarTJt7ee45rbSwbzW2jQWbgXL4/1GBiDCjJLGgo0AJmvyZkVY PxKipXgz2jpQNdCOJGt2QyA/tlKQt0d/YtzB0Iq0mbOo0ST+IzQuWiUWlhJ+8jiR 03tBt6hxByRebcEhUwUvVstwaPKiQRchx2n+yiD4qt2xeHVPYEgMiV76oL9rZxIs rZuUIbJHgTmMoZ97maWrL3OFSHfZ475nkz6b8UiFF8WnYCFb/mXdkohWtlVaWAgC O32SUTBr89BO+B+RgarXE2TSbsnvG/TSPJcuslxwPK5j1P+xS3QK45Aanr4aAv/5 rcgKfPdbfy5j2ccN9x5ZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeludejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh eptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpedfuehurhgumgdp ucfirhgvghdfuceoghhrvghgsegsuhhrugdrmhgvqeenucggtffrrghtthgvrhhnpeffhf ejhfekgeekjeevieelueelhfejuefgteefgedtkeefueektdfftdelvdfhgfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvghessghurh gurdhmvgdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthht ohepnhgrthhhrghnuggsohhsshgrrhhtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepph hgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i675e48f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 Sep 2025 10:48:32 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: [PATCH] Add tests for Bitmapset From: "Burd, Greg" In-Reply-To: Date: Fri, 5 Sep 2025 10:48:21 -0400 Cc: PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <02DB5E92-1E94-4617-AC11-836486F63BD5@burd.me> References: <7BD1ABDB-B03A-464A-9BA9-A73B55AD8A1F@getmailspring.com> To: Nathan Bossart X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 4, 2025, at 10:00=E2=80=AFPM, Nathan Bossart = wrote: >=20 > On Fri, Aug 15, 2025 at 11:39:23AM -0400, Greg Burd wrote: >> I noticed that there are no tests for Bitmapset in src/test/modules = as >> is the case for other similar things like radixtree, rbtree, etc. so = I >> created one. I realize that Bitmapset is already "tested" by all the >> other code that uses it, but I was able to find one minor = oversight[1] >> in that code with these new tests. >>=20 >> I hope I've covered all the bases, but if you have thoughts on other >> ways to test Bitmapset I'll happily add them to the patch. >=20 > Adding some tests here seems like a good idea. I might look into some = ways > to trim it down a bit, but that'd just be minor editorialization. One > other thing to consider is adding randomness to the tests (see > test_radixtree and test_binaryheap for examples). Nathan, Thank you for your interest in this patch, I appreciate that your time = is limited and highly valuable to the community. This patch isn't "earth shattering", but I think it's valuable to have test coverage even in = cases where the code being tested is already very well exercised. I looked at both radix tree and binary heap and how they use random sets = when testing. Binary heap uses it to create different random sets of numbers = to use across multiple tests while radix tree has a single function that = focuses on randomized data. I decided not to add randomization into the tests = of Bitmapset simply because I like avoiding non-deterministic behavior. = But in tests I guess that can be helpful finding future unknown corner cases. = I'm on the fence as to the value, your call. :) Let me know if you'd like that or not. >=20 > --=20 > Nathan best, and thanks again for the attention, -greg