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 1uvgUs-00HK45-0s for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Sep 2025 18:21:47 +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 1uvgUp-006lZN-Nf for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Sep 2025 18:21:44 +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 1uvgUp-006lZE-6l for pgsql-hackers@lists.postgresql.org; Mon, 08 Sep 2025 18:21:43 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uvgUn-001CZv-2Q for pgsql-hackers@lists.postgresql.org; Mon, 08 Sep 2025 18:21:42 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 8092BEC00A3; Mon, 8 Sep 2025 14:21:40 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 08 Sep 2025 14:21:40 -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=1757355700; x=1757442100; bh=gifEzWYPMxHtW743t+W1tJ67RLQkzRmmS0wDW4/oSQM=; b= DzGBRHsCND1utK70kQkU9Hri3QAeIugHxknH3jLDvLiE0umMjybu09+Lbm58EXbs JRqOUcpzrLjeSLTK8m2ldL2OsBODZfZydY7SSrgXYkO/DTE9iqd93/RnZcvzxFaC TL+R3XcYLgDiSbI2jUsXfWhBCWamr5wKYphYHUFzvPrOVhQE6QkTcS5RACqMZ8vJ xQNkUsc2CRth9g2+iqWTFj8v1NUmK4dYVzTjqnt8gCQhxfeBof46LgWuU5iWjbk5 IhOTTPxyTTrDD+MKeActFwCB4/iYTI6YxOqQBlt6LeDHxsclE4I7Xv5jxte/++yv E3C8Bbr+khzrl33Gie0kuA== 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=1757355700; x= 1757442100; bh=gifEzWYPMxHtW743t+W1tJ67RLQkzRmmS0wDW4/oSQM=; b=P cGf0KO1Jkqs5zYyAHLiFjUHTqXIE4djj7U0Fk0Cubqyxe88yaRvGOUXDVfnH44n8 xSZOiFvbby1uAbeS1YchtNb92RPg7LX4qnfpcvODolsml44h0N6K0Xiw8ANM3iuj S61EkTlZ4F8Ph7nb2WZZ6pF3BP/nDFo1OxQk9Ub7PJr4JUf5Y8VRCOeccGABDUHu bgCjkxb5pRPTlye+bWlfzVuiRxgOI9cXkZdzCjWoT4DkXrDaO4nil6GmOAy0mrXW PaXJXgII/QGFsj6AwDuvvL0Jwf5tgJq6XnA4WN2sFK/mVM77uDG+S5x3+tihg7FO RESC93esn4vR1L9r47b6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukedvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpegtggfuhfgjffevgffkfhfvofesthhqmhdthhdtjeenucfhrhhomhepfdeuuhhruggm pdcuifhrvghgfdcuoehgrhgvghessghurhgurdhmvgeqnecuggftrfgrthhtvghrnhepff fhjefhkeegkeejveeileeulefhjeeugfetfeegtdekfeeukedtffdtledvhffgnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsegsuh hrugdrmhgvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphht thhopehnrghthhgrnhgusghoshhsrghrthesghhmrghilhdrtghomhdprhgtphhtthhope hpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i675e48f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Sep 2025 14:21:39 -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: Mon, 8 Sep 2025 14:21:28 -0400 Cc: PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <9E1E0BA4-952C-412A-884A-6E700F26B0CA@burd.me> References: <7BD1ABDB-B03A-464A-9BA9-A73B55AD8A1F@getmailspring.com> <02DB5E92-1E94-4617-AC11-836486F63BD5@burd.me> 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 5, 2025, at 2:43=E2=80=AFPM, Nathan Bossart = wrote: >=20 > On Fri, Sep 05, 2025 at 10:48:21AM -0400, Burd, Greg wrote: >> 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. :) >=20 > I'm not too concerned about it. We've lived without a dedicated test = suite > for Bitmapset for a very long time, so any amount of test coverage is = an > improvement. Like you said, adding some randomization might be = helpful for > finding weird bugs we wouldn't have thought to test. And, given the = many, > many machines that run the tests, IMHO it'd only help build even more > confidence in the code. If my suggestion inspires you to update the = patch, > great, but I'm fine with proceeding with what you already wrote, too. Nathan, thanks for considering the patch. Honestly, I'm fine with it as = is. We can revisit later if needed. This does what I'd intended, test and = document in code the API and implementation making future changes to that more transparent. Thanks! -greg --=20 > nathan