Re: Trying to add more tests to gistbuild.c

2022-08-01 Thread Pavel Borisov
On Sun, 31 Jul 2022 at 00:33, Tom Lane wrote: > Matheus Alcantara writes: > > On Friday, July 29th, 2022 at 19:53, Tom Lane t...@sss.pgh.pa.us wrote: > >> I wonder if we can combine ideas from the two patches to get a > >> better tradeoff of code coverage vs. runtime. > > > I was checking the Pa

Re: Trying to add more tests to gistbuild.c

2022-07-30 Thread Tom Lane
Matheus Alcantara writes: > On Friday, July 29th, 2022 at 19:53, Tom Lane t...@sss.pgh.pa.us wrote: >> I wonder if we can combine ideas from the two patches to get a >> better tradeoff of code coverage vs. runtime. > I was checking the Pavel patch and notice that he was using the fillfactor > par

Re: Trying to add more tests to gistbuild.c

2022-07-30 Thread Matheus Alcantara
--- Original Message --- On Friday, July 29th, 2022 at 19:53, Tom Lane t...@sss.pgh.pa.us wrote: > I wonder if we can combine ideas from the two patches to get a > better tradeoff of code coverage vs. runtime. I was checking the Pavel patch and notice that he was using the fillfactor para

Re: Trying to add more tests to gistbuild.c

2022-07-29 Thread Tom Lane
Aleksander Alekseev writes: > Personally I believe this change makes perfect sense. Although this is > arguably not an ideal test for gistInitBuffering(), writing proper > tests for `static` procedures is generally not an easy task. Executing > the code at least once in order to make sure that it

Re: Trying to add more tests to gistbuild.c

2022-07-27 Thread Aleksander Alekseev
Hi Matheus, Many thanks for hacking on increasing the code coverage! I noticed that this patch was stuck in "Needs Review" state for some time and decided to take a look. > With these new tests the coverage went from 45.3% to 85.5%, but I have some > doubts: > - Does this test make sense? > - Wo

Re: Trying to add more tests to gistbuild.c

2022-05-06 Thread Matheus Alcantara
The attached patch is failing on make check due to a typo, resubmitting the correct one. -- Matheus Alcantaradiff --git a/src/test/regress/expected/gist.out b/src/test/regress/expected/gist.out index a36b4c9c56..b5edc44250 100644 --- a/src/test/regress/expected/gist.out +++ b/src/test/regress/exp

Trying to add more tests to gistbuild.c

2022-05-06 Thread Matheus Alcantara
I'm studying how the gist index works trying to improve the test coverage of gistbuild.c. Reading the source code I noticed that the gistInitBuffering function is not covered, so I decided to start with it. Reading the documentation and the source I understood that for this function to be exec