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 1v3oxu-0046Xp-4V for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Oct 2025 05:01:22 +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 1v3oxs-00FTor-31 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Oct 2025 05:01:20 +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 1v3oxr-00FTof-Nm for pgsql-hackers@lists.postgresql.org; Wed, 01 Oct 2025 05:01:20 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v3oxp-000oKO-1a for pgsql-hackers@lists.postgresql.org; Wed, 01 Oct 2025 05:01:19 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-57a604fecb4so8162889e87.1 for ; Tue, 30 Sep 2025 22:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759294871; x=1759899671; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LyMYusPGKBvFR2N2j7u3IzxJ5WDptSxrf7JYnD6tB0I=; b=mm54sm31m2nG92WKoSrYg9/aAPqmpZiBPcqhYIANXgNrAofZ8QhHVuWGy9vvuY4lza GJms8iBZ44cOZiIt9MuRNsN0orffiphSYZ1o4x9CI1goUI3Hfj6olrrDXOfjnurQijOG iy9cdaIiGXyR2IlVNirn8+Rx8vUs0Js3/4SkLyDC4naoRPj/nIWCqFbKF90E0O6w3g8D c6dv3jZeynbUBLITUrCnPl4VuBdmlV6tNQwo0Eq81YEP4hK4LjisOKllJR0PmZubXxEj SNXok4VGsS1LmVTNiTTpnKifikiz42+/yYyrMXfMHLwgmwdTpBRcm2RCs3yJIoCmSdJj ++Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759294871; x=1759899671; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LyMYusPGKBvFR2N2j7u3IzxJ5WDptSxrf7JYnD6tB0I=; b=GVidxNIx1kA3sN+Nj03IQb0JK3Xgwcyq5spWLIyIGLt3RHqTAS80sHrKEk7rRkm7Vl wDVditSrWCklu9SBnicBo/pd4wGBe3Sq3aun4gBcSeSYxcGAPJei/4KIz49607Ams+wK ogG9fr5u1pRxmcRjSN2iIQlOrIYJbLbWyT8Yze9I4YYQ/St35EIOyW053aQDwjZo+JEb Kx0DT2Virs298miZLT5wR11vllZM4qlkpy5cedbY8C5K/o+/ZwuLpaQSO+CdX60TcyZm fujoWQEFoJqEvZCyvPLhnm89MHC6MiV3exr0XGRoHvK3zO3DQzihV/qeh7ef9PuFdcGP +LTg== X-Forwarded-Encrypted: i=1; AJvYcCUEy95y+yO3I65X5EztEYZzhIV4DnkOUiXmSWsR0ryAKya8MARO/J/AGk8QpUgmitzsXrPN1Lh/IXdy0ai2@lists.postgresql.org X-Gm-Message-State: AOJu0YzgIpOuRm/GrPZyYjycGYnDoVF0BD7Vv2pn+DQCt1gjqUUnOVcY QO6TQST8VBJTCQxbXCqaphi7Gjc+bU5J/4g3gzrtBR9Y1vIBU3fTABq6dyyiySlsI65RinJl19Q Gy4xxztq0fH9GNcBFyhf/UxXbybvTWSlqys4AXlY= X-Gm-Gg: ASbGncvirIs8UgXEvDSrwdCKXUU9K+wTidnFiZYYZ20Dl/maEe8+DF58/cSGUhLRcTl c9WSe+cg58uqNGEFBd+XIXTjtzq3gBlfAyl+vw5io49tr69RBEJU7cyWss4QWncDGD0jjC7P96F RG7pUx/Lmj+TrPiueqUjctja1M3ODggFCB/flbGiu+ruHO7WwxTJI2ZxI/KiRG1JrmWoPxnBemE MG6BemVfSFolOF/y/WFqz5LZlp7HYCu2de/1rXcQDQ/tdB+CPzT860EQV4ehIuWINtq9nf6fCQY yyVXMcKuCoNzy6cJmyQZGw== X-Google-Smtp-Source: AGHT+IEy4eRenoeSUlA8R1kil9kqzsFvVKSMQFUeIudbIfVcmvNME+s9MkWJ3FIw4D5939NmQwM2ZyKZ9nQlMgvGuGI= X-Received: by 2002:a05:6512:691:b0:57f:492:3263 with SMTP id 2adb3069b0e04-58af9efda86mr488156e87.1.1759294871106; Tue, 30 Sep 2025 22:01:11 -0700 (PDT) MIME-Version: 1.0 References: <76DBEF5D-EA47-4C30-8D28-97B3B88E2E2D@greg.burd.me> In-Reply-To: From: David Rowley Date: Wed, 1 Oct 2025 18:00:59 +1300 X-Gm-Features: AS18NWD-3yqAGhc42lsaeCsbkaGIyDCdqDzqBo5Sd6Z4v5P22nUzhJIn7hU1HCA Message-ID: Subject: Re: [PATCH] Add tests for Bitmapset To: Michael Paquier Cc: Greg Burd , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 1 Oct 2025 at 16:41, Michael Paquier wrote: > Okay. Let's just remove as much code as possible, then. This is > roughly what you have sent, minus the hardcoded empty set and the free > calls. I'll just go do that in a bit. Thanks. Just for reference, you may not need it if you're mostly done already, but I had to finish this off in my head before moving on. Feel free to ignore, but there are a couple of typos fixed at the very least "varrying" should be "varying". I didn't fully rationalise the tests in test_bitmapset.sql. There are still a few which are duplicates due to '(b)' and NULL meaning the same thing. git diff --stat .../test_bitmapset/expected/test_bitmapset.out | 400 ++------------ .../modules/test_bitmapset/sql/test_bitmapset.sql | 101 +--- .../modules/test_bitmapset/test_bitmapset--1.0.sql | 2 +- src/test/modules/test_bitmapset/test_bitmapset.c | 605 +++++---------------- 4 files changed, 222 insertions(+), 886 deletions(-) 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 David