[lldb-dev] Code coverage of llvm, clang, lldb & polly

Sylvestre Ledru sylvestre at debian.org
Mon Jun 3 00:56:40 PDT 2013


Le 02/06/2013 11:26, Konstantin Tokarev a écrit :
>
> 02.06.2013, 01:36, "Sylvestre Ledru" <sylvestre at debian.org>:
>> On 01/06/2013 17:55, Konstantin Tokarev wrote:
>>
>>>  01.06.2013, 19:39, "Sylvestre Ledru" <sylvestre at debian.org>:
>>>>  http://buildd-clang.debian.net/coverage/
>>>>  Your patch fixed the issue!
>>>>  Thanks to it, the LLVM toolchain is close to the 80 % lines test
>>>>  coverage (which is excellent).
>>>  Note that line-based coverage is far from being precise.
>> Could you describe your criticism a bit more ?
> You can read through review of code coverage metrics in [1].
>
> In short, if you have a code line
>
> if ((a<b) && (c<d)) doIt();
>
> you will get 100% line coverage for it if condition is ever evaluated,
> but you'll get 100% condition/decision coverage only if tests cover 4
> different situations:
>
> 1) a<b is true, c<d is true
> 2) a<b is false, c<d is true
> 3) a<b is true, c<d is false
> 4) a<b is false, c<d is false
Yes, right but the current solution remains interesting (even if it is
not perfect).
>>>  To get more realistic estimation of coverage, you need to use coverage tool that
>>>  provides decision and condition coverage, e.g. TestCocoon.
>> Are you aware of any free software providing this feature ? I would be
>> happy to try.
> I'm using TestCocoon [2]. It is open source tool under GPLv3 license. Unfortunately,
> it's effectively dead right now, because it was bought by Froglogic and is developed
> as proprietary tool Squish Coco [3] now. On the positive side, Squish Coco is available
> for free (as beer) for non-commercial usage [4].
>
Yeh but I would prefer to use FLOSS software...

Sylvestre




More information about the lldb-dev mailing list