agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Minor fixes for test_bitmapset.c
Date: Sun, 19 Apr 2026 21:59:09 +0000
Message-ID: <E1wEaAW-001lRc-2H@gemulon.postgresql.org> (raw)

Minor fixes for test_bitmapset.c

1. Make it so test_random_operations() can accept a NULL to have the
   function select a random seed.
2. Widen the seed parameter of test_random_operations() to bigint.
   Without that, it'll be impossible to run the function with a seed
   which was selected by GetCurrentTimestamp(), and if a randomly
   selected seed ever results in a failure, we'll likely want to run
   with the same seed to debug the issue.
3. Report the seed in the error messages in test_random_operations().
   If the buildfarm were ever to fail there, we'd certainly want to know
   what this was.
4. Add CHECK_FOR_INTERRUPTS() to test_random_operations().  Someone might
   run with a large num_ops and they'd have no way to cancel the query.
5. Minor cosmetic fixes; header order and whitespace issue.

To allow #1, the STRICT modifier had to be removed.  The additional
prechecks were added as I didn't see how else to handle someone passing
those parameters as NULL.

Author: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Greg Burd <greg@burd.me>
Discussion: https://postgr.es/m/CAApHDvrDW9W72vAr7h7XeCu7+Qz-_Vff02Q+RPPuVeM0Qf0MCw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5142f0093e648d1a32fdcc7c835d17fa103e1239

Modified Files
--------------
.../test_bitmapset/expected/test_bitmapset.out     |  2 +-
.../modules/test_bitmapset/sql/test_bitmapset.sql  |  2 +-
.../modules/test_bitmapset/test_bitmapset--1.0.sql |  4 +--
src/test/modules/test_bitmapset/test_bitmapset.c   | 42 +++++++++++++++++-----
4 files changed, 37 insertions(+), 13 deletions(-)



Message-ID: <E1wEaAW-001lRc-2H@gemulon.postgresql.org>
Permalink:  ../E1wEaAW-001lRc-2H@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wEaAW-001lRc-2H@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Minor fixes for test_bitmapset.c
  In-Reply-To: <E1wEaAW-001lRc-2H@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox