pgsql: test_bitmapset: Improve random function

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: test_bitmapset: Improve random function
Дата
Msg-id E1v6yzx-000u0K-1f@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
test_bitmapset: Improve random function

test_random_operations() did not check the result returned by
bms_is_member() in its last phase, when checking that the contents of
the bitmap match with what is expected.  This was impacting the
reliability of the function and the coverage it could provide.

This commit improves the whole function, adding more checks based on
bms_is_member(), using a bitmap and a secondary array that tracks the
members added by random additions and deletions.

While on it, more comments are added to document the internals of the
function.

Reported-by: Ranier Vilela <ranier.vf@gmail.com>
Author: Greg Burd <greg@burd.me>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/CAEudQAq_zOSA2NUQSWePTGV_=90Uw0WcXxGOWnN-vwF046OOqA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d46b86529e8337e34fb5a65b1a7dca9dc53938f

Modified Files
--------------
src/test/modules/test_bitmapset/test_bitmapset.c | 57 ++++++++++++++++++------
1 file changed, 44 insertions(+), 13 deletions(-)


В списке pgsql-committers по дате отправления: