Unix Technical Forum

code coverage patch

This is a discussion on code coverage patch within the pgsql Hackers forums, part of the PostgreSQL category; --> Peter Eisentraut wrote: > Michelle Caisse wrote: >> gcov gets confused when source files are generated. I eliminated >> ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 09-05-2008, 12:02 PM
Peter Eisentraut
 
Posts: n/a
Default Re: code coverage patch

Peter Eisentraut wrote:
> Michelle Caisse wrote:
>> gcov gets confused when source files are generated. I eliminated
>> src/backend/bootstrap and ../parser from coverage analysis to avoid
>> errors of this type.

>
> The problem with those files is that the source file contains lines like this:
>
> #line 1042 "y.tab.c"
>
> but that source file does not exist, as it is renamed to gram.c.


This problem is now fixed, so the workaround in the coverage patch can
be dropped.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 09-05-2008, 12:04 PM
Alvaro Herrera
 
Posts: n/a
Default Re: code coverage patch

Michelle Caisse wrote:
> I've attached a patch that allows the generation of code coverage
> statistics. To test it, apply the patch, then:
>
> autoconf
> ./configure --enable-coverage
> make
> make check (or execute any other application against the database to see
> the coverage of that app)
> make coverage
> make coverage_out


"make clean" does not work for me; it doesn't remove the .gcda and .gcno
files. Apparently the problem is that $(enable_coverage) is not
defined, so that part of common.mk is not called.

Note: one thing to keep in mind is directories like src/port. There are
some .gcda and .gcno files in there too, but even if common.mk is fixed,
they will not be cleaned because src/port does not seem to use
common.mk.

Another thing that I'm unsure about is the coverage_out target. It does
work, but is it running the coverage target each time it is invoked?
Because if so, it's removing all of ./coverage and creating it again ...
is this the desired behavior?

This patch is missing a installation.sgml patch, at a minimum. I think
it would be useful to mention that we support gcov, and the make targets
we have, in some other part of the documentation. I can't readily find
a good spot, but I think a new file to be inserted in the internals
chapter would be appropriate.

Two hunks no longer apply, but that's OK because they were working
around a problem that no longer exists. Other than the minor gripes
above, the patch looks OK to me.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 09-05-2008, 12:04 PM
Michelle Caisse
 
Posts: n/a
Default Re: code coverage patch

Thanks, I'll take a look at these issues.

-- Michelle

Alvaro Herrera wrote:

>Michelle Caisse wrote:
>
>
>>I've attached a patch that allows the generation of code coverage
>>statistics. To test it, apply the patch, then:
>>
>>autoconf
>>./configure --enable-coverage
>>make
>>make check (or execute any other application against the database to see
>>the coverage of that app)
>>make coverage
>>make coverage_out
>>
>>

>
>"make clean" does not work for me; it doesn't remove the .gcda and .gcno
>files. Apparently the problem is that $(enable_coverage) is not
>defined, so that part of common.mk is not called.
>
>Note: one thing to keep in mind is directories like src/port. There are
>some .gcda and .gcno files in there too, but even if common.mk is fixed,
>they will not be cleaned because src/port does not seem to use
>common.mk.
>
>Another thing that I'm unsure about is the coverage_out target. It does
>work, but is it running the coverage target each time it is invoked?
>Because if so, it's removing all of ./coverage and creating it again ...
>is this the desired behavior?
>
>This patch is missing a installation.sgml patch, at a minimum. I think
>it would be useful to mention that we support gcov, and the make targets
>we have, in some other part of the documentation. I can't readily find
>a good spot, but I think a new file to be inserted in the internals
>chapter would be appropriate.
>
>Two hunks no longer apply, but that's OK because they were working
>around a problem that no longer exists. Other than the minor gripes
>above, the patch looks OK to me.
>
>
>


--
Michelle Caisse Sun Microsystems
California, U.S. http://sun.com/postgresql



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads for: code coverage patch

Thread Thread Starter Forum Replies Last Post
WSAD 5.1.2 Code Coverage Type Tools torchwoodagentfletch@googlemail.com Websphere Application Server 0 07-28-2008 06:43 PM
Generating code coverage reports Michelle Caisse pgsql Hackers 2 07-14-2008 06:49 PM
Reversing Code Coverage Tool xenophi1e Security Vulnerabilities 0 07-02-2008 06:04 PM
Re: Rcov - interactive code coverage for fuzzers Ari Takanen Discussion with Dave Aitel 3 07-01-2008 09:04 PM
Rcov - interactive code coverage for fuzzers Kowsik Discussion with Dave Aitel 1 07-01-2008 09:04 PM


All times are GMT. The time now is 07:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com