[Ltp-coverage] lcov for Samba4, relitative names

Peter Oberparleiter peter.oberparleiter at de.ibm.com
Wed Sep 7 07:33:49 GMT 2005


Andrew Bartlett wrote:
> I've been interested in lcov since I saw it come up on the wine lists a
> while back, and a recent move to add gcov support to Samba4 prompted me
> to play with lcov.

It's always exciting to hear about people that consider using lcov to 
improve testing of their projects (especially if it's a renowned project 
like Samba :)

> Anyway, the issue I have is that Samba4's 'unique' build system compiles
> the system with a working dir in the root of source/, rather than
> recursing into each subdirectory.  

This problem may not be unique to Samba - the Linux kernel build system 
has been changed in a similar way (compilation from TOPDIR without 
recursing into subdirectories). The workaround that was implemented in 
the kernel case was to make sure that every source code/include 
directory statement had an absolute path statement. That way all 
filename references embedded within the object files were absolute as 
well and lcov could find the source files. Maybe give this approach a 
try in the Samba case as well.

> ./autogen.sh && ./configure.developer --prefix=`pwd`/prefix && make
> clean pch gcov lcov
> 
> Should show the problem...

I'll have a look at this one.

> I'm thinking we might just need a --base-dir option, or some such.

This would work for those instances where the lcov script itself is 
looking for a file. On the other hand the gcov tool (called from the 
lcov script) is looking for those files as well (although it doesn't 
actually need them as all the coverage information can be reconstructed 
from .gcda and .gcno file contents). Anyway I'll have a look at the 
Samba build system and consider the base-dir option.


Regards,
   Peter Oberparleiter


More information about the samba-technical mailing list