Hi hackers, > 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.
Here is version 3 of the patch. Test coverage is 92.3% of functions, 73.4% of lines of code. Not all error handling was covered, and I couldn't cover SimpleLruWaitIO(). The latest requires writing a concurrent test, which from what I know is not exactly what unit tests are for. We can make it public if we want to, but considering the simplicity of the function and the existence of many other tests I didn't find it necessary. I think the tests are about as good as they will ever get. -- Best regards, Aleksander Alekseev
v3-0001-Unit-tests-for-SLRU.patch
Description: Binary data