r2744: ben elliston taught me about gcov today, which allows you to measure
authorAndrew Tridgell <tridge@samba.org>
Wed, 29 Sep 2004 06:31:14 +0000 (06:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:29 +0000 (12:59 -0500)
commit8d4dc99b82efdf24b6811851c7bdd4af5a4c52c9
treedd1ff4a3cd8e26ab9315d8ba08974fc40b49ca23
parent43079cfc80317b6d0d2679f9377aac259e0f8fc7
r2744: ben elliston taught me about gcov today, which allows you to measure
the % coverage in terms of lines of code of a test suite. I thought a
good first place to start with gcov was the talloc test suite. When I
started the test suite covered about 60% of all lines of code in
talloc.c, and now it covers about 99%. The only lines not covered are
talloc corruption errors, as that would cause smb_panic() to fire.

It will be interesting to try gcov on the main Samba test suite for
smbd. We won't achieve 100% coverage, but it would be nice to get to
90% or more.

I also modified the talloc.c sources to be able to be build standalone, using:

  gcc -c -D_STANDALONE_ -Iinlcude lib/talloc.c

that should make it much easier to re-use talloc in other projects
source/include/includes.h
source/include/talloc.h
source/lib/talloc.c
source/torture/local/talloc.c
talloc_guide.txt