summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/README_gcov.txt
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-24 02:49:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:36 -0500
commit3e2c696e45b24b0192ab7b1ddaf1dd4d79571609 (patch)
tree9c4423bdb006f7c183fea0c87331d23e7043d0b1 /source3/lib/ldb/README_gcov.txt
parent0c3194816b513e3743ddcacd1eca2b683ca39b88 (diff)
downloadsamba-3e2c696e45b24b0192ab7b1ddaf1dd4d79571609.tar.gz
samba-3e2c696e45b24b0192ab7b1ddaf1dd4d79571609.tar.bz2
samba-3e2c696e45b24b0192ab7b1ddaf1dd4d79571609.zip
r18866: Jeremy and Volker have given the go-ahead on the group mapping ldb
code. Yay! This first commit copies lib/ldb/ from Samba4. A huge congratulations should go to Simo on this - he has put an enormous amount of work into ldb, and it's great to see it go into the Samba3 tree. (This used to be commit bbedf2e34315f5c420a3a05dfe22b1d5cf79f042)
Diffstat (limited to 'source3/lib/ldb/README_gcov.txt')
-rw-r--r--source3/lib/ldb/README_gcov.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/lib/ldb/README_gcov.txt b/source3/lib/ldb/README_gcov.txt
new file mode 100644
index 0000000000..2abd9378f4
--- /dev/null
+++ b/source3/lib/ldb/README_gcov.txt
@@ -0,0 +1,29 @@
+Here is how to use gcov to test code coverage in ldb.
+
+Step 1: build ldb with gcov enabled
+
+ make clean all WITH_GCOV=1
+
+Step 3: run the test suite
+ make test-tdb
+
+Step 4: produce the gcov report
+ make gcov
+
+Step 5: read the summary reports
+ less *.report.gcov
+
+Step 6: examine the per-file reports
+ less ldb_tdb\#ldb_tdb.c.gcov
+
+You can also combine steps 2 to 4 like this:
+
+ make clean all test-tdb gcov WITH_GCOV=1
+
+Note that you should not expect 100% coverage, as some error paths
+(such as memory allocation failures) are very hard to trigger. There
+are ways of working around this, but they are quite tricky (they
+involve allocation wrappers that "fork and fail on malloc").
+
+The lines to look for in the per-file reports are the ones starting
+with "#####". Those are lines that are never executed.