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 1uubP3-00DXpH-BT for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 18:43:18 +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 1uubP1-009hNX-Da for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 18:43:15 +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 1uubP1-009hNP-3z for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 18:43:15 +0000 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uubOz-000iwO-1I for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 18:43:14 +0000 Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-3f663c571ffso25517315ab.1 for ; Fri, 05 Sep 2025 11:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757097792; x=1757702592; 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=rEXn9Asq/fp3OnRuyvixZTskhhRSdXpADEqN3G2il7M=; b=jA8xkm9ai+shpk0CF9G6BXsIzQwL0Mo3unyVp7T/f553qXmmUcD1+aMO8t9Dlup/nx 0m+hbpffV7h5UlSLpX/O7U0Ya9Z2arO51appYCZUrXxKOry+XnUSTudcT9s4crkSRM28 Pm9ib9F0IdTt3ZBLHSKPtvelUWw2Upgrv7tQTlc+YW7kj5tR/oIyF4Fpq83Vr67l9d5D FIeaYmetMFLsu8DRvkAKwJ3aHgCNf7WG0EPcVB6ZVvV5CJ4A+2uPh9NTRrQP1qjFQpTF +4z+fqunWl2QQ9kVmd4G69c4okSyio69ZrlPBR+3EQCG6j+xca/7HzhX/ZZhIdzd3I+Z 0jgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757097792; x=1757702592; 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=rEXn9Asq/fp3OnRuyvixZTskhhRSdXpADEqN3G2il7M=; b=s8WuXh+ZIWhRFJLhmYCTLC8FERm0led6T8S7MtYDEw7tZwIPe7tptlFYFu00F+JiHi DjTcqTQFGSL9jFHEONZYnnRMGs2KMKJLvH6o9BVhpjvblzEbmnu6PepDIy2pUN1mP3pg SdfZBlQl1mdlYZLfnZRo8S/0n/dgsd0Nez1VDTxOg9byjCMbNiCmMJgbaoyavmP84Tmm lpxFTacOv5pJt4m40b4lgabKkFfBT17ahXJcFb2rIYkwPx3CycKxhgrC/n53eCA0nsNZ bmVS8L7OvnAos9qVG71Mj7TEa87WzCWzp53JlJOGZfbtQted4cSJko25gKB/87IaNfpj 9/cQ== X-Gm-Message-State: AOJu0YwEiDp3U2gaNd4kCkhgMIu+kWIjXW1b6JKjJBZfUXzyRmQr+r2D D9626S0IQm+gUQJmtAKiDzf+SihRbxeJBDT0lk/KSKlIyD/IwH4zBr1BihR7Tg== X-Gm-Gg: ASbGnctLgBpA4VMSKJ33r6RUOmgqSmSNOdHNtz4rW7B6gZq0M5OpTxuEggou33SfkrH cTgJh8+FEleFf2z8Li4NMXMEW1Jzsv1IAwERPD3awfZJXhcQhYRHLTupb3+Siz1Q4RpZ/wwOjrD 1SDPM7dn6bi11O4X5nmACobr0WI+eEKo7NzMeTUCORTtJK2DXM53gYPZ1ogsvi+c06X8nSOd0xT +k9OIv/dzgl5v15EHBkFvJFx6Wtw7GbLwgro4Fps1XhDhpYz1D9ME/M+ajK4NaxcrCO7OGwX+OR 4dgMZgSKP8rFo/FTLDndfekcTKo5C9K0v9xPHU4aYoLHeprdgy0DaYdNLsjfq5TepIB+LSmJMay LBm4sdb8BCDXFmz6zf4iC9dIWa0gD5BkU8iteJgh3Eynmb+fEFk6+VStM5zn9Psxwc+Fx4g7z7i FoLV+LiZwOFJizKh5FeyW8aa8= X-Google-Smtp-Source: AGHT+IGbg6YEAvlp91dpiH03ILfDHnSyzqS9V0YWHm2N/l13JxEkb8Job3vXpxK6NgZrSuZgy8Q/tA== X-Received: by 2002:a92:c243:0:b0:3f3:7aad:4221 with SMTP id e9e14a558f8ab-3f4026c3666mr410419875ab.29.1757097792111; Fri, 05 Sep 2025 11:43:12 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3f3de24e723sm77471075ab.7.2025.09.05.11.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Sep 2025 11:43:11 -0700 (PDT) Date: Fri, 5 Sep 2025 13:43:09 -0500 From: Nathan Bossart To: "Burd, Greg" Cc: PostgreSQL Hackers Subject: Re: [PATCH] Add tests for Bitmapset Message-ID: References: <7BD1ABDB-B03A-464A-9BA9-A73B55AD8A1F@getmailspring.com> <02DB5E92-1E94-4617-AC11-836486F63BD5@burd.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02DB5E92-1E94-4617-AC11-836486F63BD5@burd.me> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. :) 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