Re: Unit tests for SLRU

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>, Pavel Borisov <pashkin.elfe@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Maxim Orlov <orlovmg@gmail.com>, Noah Misch <noah@leadboat.com>, Daniel Gustafsson <daniel@yesql.se>
Date: 2022-11-15T10:15:51Z
Lists: pgsql-hackers

Attachments

Hi Michael,

> I have reworked that as per the attached, that provides basically the
> same coverage, going through a SQL interface for the whole thing.
> Like all the other tests of its kind, this does not use a TAP test,
> relying on a custom configuration file instead.  This still needs some
> polishing, but the basics are here.

Many thanks for the updated patch. I didn't know one can run tests
with a custom postgresql.conf without using TAP tests.

> What do you think?

It looks much better than before. I replaced strcpy() with strncpy()
and pgindent'ed the code. Other than that to me it looks ready to be
committed.

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Add test module for SLRUs

  2. Fix comment of SimpleLruInit() in slru.c