s3:net_idmap_dump deal with idmap config * : backend config style
[Samba/gebeck_regimport.git] / lib / ldb / README_gcov.txt
blob2abd9378f438ffaec926c080b6819e467c0fed3b
1 Here is how to use gcov to test code coverage in ldb.
3 Step 1: build ldb with gcov enabled
5      make clean all WITH_GCOV=1
7 Step 3: run the test suite
8      make test-tdb
10 Step 4: produce the gcov report
11      make gcov
13 Step 5: read the summary reports
14      less *.report.gcov
16 Step 6: examine the per-file reports
17      less ldb_tdb\#ldb_tdb.c.gcov
19 You can also combine steps 2 to 4 like this:
21      make clean all test-tdb gcov WITH_GCOV=1
23 Note that you should not expect 100% coverage, as some error paths
24 (such as memory allocation failures) are very hard to trigger. There
25 are ways of working around this, but they are quite tricky (they
26 involve allocation wrappers that "fork and fail on malloc").
28 The lines to look for in the per-file reports are the ones starting
29 with "#####". Those are lines that are never executed.