Re: Unit tests for SLRU

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: Unit tests for SLRU
Date: 2022-04-05 12:14:17
Message-ID: CAJ7c6TPUd9BwNY47TtMxaijLHSbyHNdhu=kvbGnvO_bi+oC6_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

>> Again, I don't have a strong opinion here. If you insist, I will place the
>> tests to regress.c.
>
> It is up to committer to decide, but I think it would be good to place tests
> in regression. In my opinion, many things from core may be used by extensions.
> And then it is up to extension authors to make relevant tests.
>
> For me, it's enough to make a reasonable test coverage for SLRU without
> investing too much effort into generalization.

OK, here is an updated version of the patch. Changes comparing to v1:

* Tests are moved to regress.c, as asked by the majority;
* SimpleLruInit() returns void as before, per Daniel's feedback;
* Most of the initial refactorings were reverted in order to keep the patch
as small as possible, per Maxim's feedback.

LCOV indicates 65% of code coverage in terms of lines of code. I'm currently
working on improving this number.

More feedback is always welcome!

--
Best regards,
Aleksander Alekseev

Attachment Content-Type Size
v2-0001-Unit-tests-for-SLRU.patch application/octet-stream 13.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2022-04-05 12:40:47 Re: [COMMITTERS] pgsql: Allow time delayed standbys and recovery
Previous Message Antonin Houska 2022-04-05 11:59:30 Re: Logical replication row filtering and TOAST