Thread: Increasing code-coverage of 'make check'
Hi,
I was checking code-coverage of 'make check' and saw that the regression tests don't touch files like psql_help.c at all (read 0%).
Attached is a (very small) patch to work on one ABORT help function as a sample.
The reason why I post this is, to know if increasing the code-coverage (as a task) is considered important at all (to me it is). If so, I could get going with creating tests for more untouched lines / functions in 'make check'.
Any other feedback is more than welcome.
(The patch is wrt to yesterday's pull)
---
Robins
Tharakan
Attachment
Robins wrote: > Hi, > > I was checking code-coverage of 'make check' and saw that the regression > tests don't touch files like psql_help.c at all (read 0%). > > Attached is a (very small) patch to work on one ABORT help function as a > sample. > > The reason why I post this is, to know if increasing the code-coverage (as > a task) is considered important at all (to me it is). If so, I could get > going with creating tests for more untouched lines / functions in 'make > check'. I think increasing coverage is a good thing. But psql help? *shrug* backend code is far more interesting and useful. Another thing to keep in mind is that there are some corner cases that are interesting to test that might not necessarily show up in a coverage chart -- for example how stuff behaves in the face of concurrent processes, or when various counters wrap around. Peter Eisentraut has set up a Jenkins instance that publishes coverage info. http://pgci.eisentraut.org/jenkins/job/postgresql_master_coverage/Coverage/ (I think he only has it running "make check"; doing the isolation tests probably raises percentages a bit). -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Thanks Alvaro!
The thought of psql_help purely because it was the easiest at that time. Since I've just begun my understanding of the code is barely negligible.
I began working on SEQUENCE related tests thereafter and hopefully would move to more complicated tests in time. Peter's link is obviously helpful but since I end up doing make check ~100 of times a day, for now its useful only to cross-check how much code is uncommitted :)
Robins
On 11 March 2013 09:16, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
I think increasing coverage is a good thing. But psql help? *shrug*
backend code is far more interesting and useful.
Another thing to keep in mind is that there are some corner cases that
are interesting to test that might not necessarily show up in a coverage
chart -- for example how stuff behaves in the face of concurrent
processes, or when various counters wrap around.
Peter Eisentraut has set up a Jenkins instance that publishes coverage
info.
http://pgci.eisentraut.org/jenkins/job/postgresql_master_coverage/Coverage/
(I think he only has it running "make check"; doing the isolation tests
probably raises percentages a bit).