Re: Unit tests for SLRU - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Unit tests for SLRU
Date
Msg-id CAJ7c6TPUd9BwNY47TtMxaijLHSbyHNdhu=kvbGnvO_bi+oC6_Q@mail.gmail.com
Whole thread Raw
In response to Re: Unit tests for SLRU  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Unit tests for SLRU
List 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

pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Logical replication row filtering and TOAST
Next
From: Robert Haas
Date:
Subject: Re: should vacuum's first heap pass be read-only?