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 1v1YuN-009z4Z-1T for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Sep 2025 23:28:23 +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 1v1YuL-00GOKx-B3 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Sep 2025 23:28:21 +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 1v1YuL-00GOKp-1A for pgsql-hackers@lists.postgresql.org; Wed, 24 Sep 2025 23:28:21 +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 1v1YuH-002i19-05 for pgsql-hackers@lists.postgresql.org; Wed, 24 Sep 2025 23:28:20 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id 70AC4EC026C; Wed, 24 Sep 2025 19:28:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Wed, 24 Sep 2025 19:28:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc: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=1758756497; x=1758842897; bh=MpMOYahhvZ T8aEtTKi2qb3K63kxWfiFzW27lImhSg3A=; b=fmt0ztGnjNn3koRx3SZxEyC5tH mLefa/YlyfIKgXqgM8h5EJFD3hcEFefIJm/C10hKf8Eg6Qgi10k/uIix6vj5HJd7 QqMdqjpX4qOf8XVq23inMt0cfJezYs0lKWKylYk2fGnDof83yWjtbkrWCHD1DRgR OBbgz3+YUDfEF8mfF12UgkRbBPCcNL1zIPhAsqxdr3REZ2KDW2ICf+XDjVIhCS3S /QAW2F2E1cbNgDGbvU3A8OpKFP3gWciM2lXwku24p/4NU2suGdOHl8lz97h+Bvmo lcGKg6Ju8haXEXiIMpuevRSdMxTjI/uVV5LBenVTyi3sfe+D1M4BjAZRLZbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= 1758756497; x=1758842897; bh=MpMOYahhvZT8aEtTKi2qb3K63kxWfiFzW27 lImhSg3A=; b=dYYLOHFCf1ps9/m5hWr2OkRvE7UD3J87pARij/r5ke72HEzf+Xu xq/tWHpaKCJH/vCG/VL1TOfYAFRm3m2+BYLThipbuRKOsAqWHcTzYgL4poxtHV2U rTxG78EEZWO+sqYQWn0L6hC5FZFxHp0Y8wVXJgM95cALNydCaKHwmtowSredJd0W BSXFvSCIbv4+Jjyze2m76xN1aqBqiMAhcHkXPc3YC0zE9dLBQC72ux4/OxOSQB7p x76u8X1HNovY1lGhMfgowbwEzIQ0YqcCYz6ls7XEm4lkxy/a56y7saISibr7Ht1h +v0wt4G13Ko4EHOah50nIeHNhYirhyFltNA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeigeelvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeegffejvefgveduvdejtddvtdeijeeh udeuledvudeftdfgfeejvdekveekiedvvdenucffohhmrghinhepphhoshhtghhrvghsqh hlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepfedpmh houggvpehsmhhtphhouhhtpdhrtghpthhtohepghhrvghgsegsuhhrugdrmhgvpdhrtghp thhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopehpghhsqhhlqd hhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Sep 2025 19:28:15 -0400 (EDT) Date: Thu, 25 Sep 2025 08:28:02 +0900 From: Michael Paquier To: Greg Burd Cc: Tom Lane , PostgreSQL Hackers Subject: Re: [PATCH] Add tests for Bitmapset Message-ID: References: <20A8207F-B849-40B4-821D-8D334C101DCD@getmailspring.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jKcSg4kTLdAkg9hU" Content-Disposition: inline In-Reply-To: <20A8207F-B849-40B4-821D-8D334C101DCD@getmailspring.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --jKcSg4kTLdAkg9hU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 24, 2025 at 07:39:59AM -0400, Greg Burd wrote: > Thanks Michael, Tom, for the help getting this into shape and in the tree. By the way, Greg, do you think that we should aim for a state where we are closer to completion? We have the module up to the point where we are in pretty good shape, with most things and the infrastructure done but it can be improved a bit more, as well.=20 Based on the information provided by the coverage report at https://coverage.postgresql.org/src/backend/nodes/bitmapset.c.gcov.html, we still have the following things: - bms_equal for different word counts - bms_union, bms_nonempty_difference, bms_is_subset and bms_intersect with shorter word counts. - bms_different with different word counts - A couple more cases with bms_subset_compare - bms_member_index and word counts - bms_overlap_list with negative number in input list. - bms_singleton_member ERROR with empty input. - bms_get_singleton_member with NULL input - bms_del_member with word counts - bms_replace_members and repalloc case - bms_add_range, bms_join and bms_del_members, more word count cases - bms_prev_member and the prevbit business There is not much we can do with the random function, still we could do something about the NULL paths in the internal functions: https://coverage.postgresql.org/src/test/modules/test_bitmapset/test_bitmap= set.c.gcov.html The coverage of the latter matters less than the coverage of the former, of course. -- Michael --jKcSg4kTLdAkg9hU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmjUfoIACgkQnvQgOdby QH0lBw//Uk76j9UZjOuYsLT/7a76v84zV1h01AhbVPR3jAGJUkOqdicwe0/bl1TB zGR11WwQ6FqK5UqlGKzNvn7uZ3sJsvrR9X+gATh2DxwjTv81w6F2f3eiCmcMFXFn /oGtG5Soa/iWeEfTsAAW8Vm+X27+e8P8+JWrK+Tt5MHLNSZTxvOG2eBKncyjD3q7 A/eHxk4ld3oLWe1Rt6XeUF8LQQH5hxNTj4gLUxS1TzOLB2IU1lhhYezOApZP5gAg NC6S7+p/iwMmmdQfFEGIhKxYPNzy7rg0a8S1PNsaVDin287SzFeye21qaQ0DoVi+ uFjIDt7li30MNs5egFge2CM1WSAjQiZUOsaPU3/0RSLOAmjmP9cZR4pXQXc40F7h bD45LBXSy5aafgxfoOKOfAqFsTYfI+fduDJbGWHMI989V2EsNCoIBb08GaXqdMqx afbFzyy6cuvfs4oLNoHbBB8VTELvaYiCJ5+aIlR16SefryQqJPtdb6fM3U0L0TyL uLtayIPhz0g/6iv7EYZTkl2wGUgNC+grgqxTWplt+wz+56+pbFZpHFTxeGWPFK0H pkzQ93i/WByeaLgL4tWR1oih1Nk/hEkfqltKSwI9Dp2e412PfvCqIQZstoaDXsso DRRVVzeXF5VPB+u182xE04SH/jorbZgKImxqIEHcSv6hD0vb024= =rB6l -----END PGP SIGNATURE----- --jKcSg4kTLdAkg9hU--