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 1uuLkd-007S1Q-CZ for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 02:00:32 +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 1uuLkb-003pad-5E for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 02:00:29 +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 1uuLka-003paV-S4 for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 02:00:29 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uuLkX-000dKv-2P for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 02:00:28 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3f664c47ac9so10471815ab.2 for ; Thu, 04 Sep 2025 19:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757037624; x=1757642424; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8ci3a9dh0r5Kgf5pVl/+Pwc3YzBxxgQN7BAjeBDX7R0=; b=Q3tIYFwUC0YFyHOEj+dZMxO61hdfjVDGa1gzotjwodKMxD2B2ivyByHGtVHsmw3Zyw jb9hzt0MDkW/9s5CNSKzZJwLFWwWTUbBOdrEsIl/bjeDU7RNmDUMdX2GFJHnvHX1MkV3 rv1pi0cojSnZxyjF96aYXF8rWgX459rKOe0jtXxUPP9eX8J+p6HcvJyWRsQ6yJE09NbN 4qrOyge52pf1RZ++3KPnrjXvS+a/9sCdeWbBvp36w4EhfUCsSsDFePAp7yRa8pJGu37x sgIBg2TEQA3m/iQZzInWg8JXX7d0FRj0f7lzciklYqW8rjgEcXDotbJiOLAf9yHaY4TK iDrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757037624; x=1757642424; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8ci3a9dh0r5Kgf5pVl/+Pwc3YzBxxgQN7BAjeBDX7R0=; b=LIIU3mArdiS3EqOEtXJxb/7p3bed+cCmE8m4U2M3Nqc8VwqfEVK2dCA/LhK1HYHsxl C70QL5+3eWBwto0crivWLFuJCSCSs018cHfZSQ+6Qxv7kKqih3yMVEavQQIQzQqPp/wO ySrnUsS5tWX/4nzCTfFjQgFnc9grr3vsvesVg3Vlo7Q+U75/y2BIwRIl32sTgPbBvWPE 1xEk1tu1uMJR9CyfQvwsJF/tH0gK1mKexy8ZF2TPSZwTCxk/nbS4zSW/ImQnLI0RKfYe 1hpnsObPQ/fFaLBQqD2jVAFhMc2TB7FrkFd+4N0b/iO7H87ZzjlMPTBVxq839JfNmhvb VQwQ== X-Gm-Message-State: AOJu0YzPIdxIatlj12pMxCZQcZ4pQeR7hMT0Sq2tFklNPAe/ZP9CYUFn kUYSEudjxJ+RiAZghP0E4jpSGYTjIPZPJSMJsk+vxX4W2uB5dzdFlL82 X-Gm-Gg: ASbGncsZebFs3FPZWuEIhIBiMU9lr537nz87UE+WqjSWQtcyaayLewY2ctrdVSAw90Y +oR4lPKXidAO+2Z49wJNj+QwMsK7WztovHIj2B8rP6vlvNajf9nHmrQkxWIk+5D21q7JqTEg3fA UotfIWD5TuFJ6Ib8KD0/fUlx/vwC2HM8R/P+qgdMQFaZGqOvf1kJBa+40QeiOl+w3JCvPjRqiXh no5vsOYUvGsYtromkuELViiBJ8WOOUwfiiXcyAtpk0JGu7VVCdr71NLdmsU+M7JWGLr70+IQumV gjYZUztuWke45HtuFKGpxpxt3c6jTc6y+oc68kWLvloMCXxL6jRNDIQrIIwzyrYvrSfZWGWuN8v 2dfmvo69cQIblPnFWuuJ6d7ENDqablRH9ggCdlesC/H0aWY2mRRipbTna2w0nO4OEoZWOYV6Xqj VM7GXEPEgvQU/gkvwWmojKIFI= X-Google-Smtp-Source: AGHT+IFUOLx/IbHLeAXf3wjJywDpO6uRBrJFG7IXrn9fPXR7I+72anOwHF5qxP9crQvv3vkl7889CQ== X-Received: by 2002:a05:6e02:17c9:b0:3f0:2859:4782 with SMTP id e9e14a558f8ab-3f4019f8d2dmr342633205ab.16.1757037624426; Thu, 04 Sep 2025 19:00:24 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5102f82253fsm2623726173.10.2025.09.04.19.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Sep 2025 19:00:23 -0700 (PDT) Date: Thu, 4 Sep 2025 21:00:22 -0500 From: Nathan Bossart To: Greg Burd Cc: PostgreSQL Hackers Subject: Re: [PATCH] Add tests for Bitmapset Message-ID: References: <7BD1ABDB-B03A-464A-9BA9-A73B55AD8A1F@getmailspring.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7BD1ABDB-B03A-464A-9BA9-A73B55AD8A1F@getmailspring.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. > > 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. 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