pgsql: Add a test harness for the LWLock tranche code.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add a test harness for the LWLock tranche code.
Date: 2025-09-18 20:23:59
Message-ID: E1uzLAd-001Nxh-1P@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add a test harness for the LWLock tranche code.

This code is heavily used and already has decent test coverage, but
it lacks a dedicated test suite. This commit changes that.

Author: Sami Imseih <samimseih(at)gmail(dot)com>
Co-authored-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAA5RZ0tQ%2BEYSTOd2hQ8RXdsNfGBLAtOe-YmnsTE6ZVg0E-4qew%40mail.gmail.com
Discussion: https://postgr.es/m/CAA5RZ0vpr0P2rbA%3D_K0_SCHM7bmfVX4wEO9FAyopN1eWCYORhA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/16607718c0107e971bf155c6357c193cc3f8f66a

Modified Files
--------------
src/test/modules/Makefile | 1 +
src/test/modules/meson.build | 1 +
src/test/modules/test_lwlock_tranches/.gitignore | 4 +
src/test/modules/test_lwlock_tranches/Makefile | 25 +++++
.../expected/test_lwlock_tranches.out | 25 +++++
src/test/modules/test_lwlock_tranches/meson.build | 35 ++++++
.../sql/test_lwlock_tranches.sql | 8 ++
.../test_lwlock_tranches--1.0.sql | 16 +++
.../test_lwlock_tranches/test_lwlock_tranches.c | 123 +++++++++++++++++++++
.../test_lwlock_tranches/test_lwlock_tranches.conf | 1 +
.../test_lwlock_tranches.control | 4 +
11 files changed, 243 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-09-19 01:01:55 pgsql: Document and check that PgStat_HashKey has no padding
Previous Message Bruce Momjian 2025-09-18 15:30:02 pgsql: doc PG 18 relnotes: set release date, remove "CURRENT AS OF"