Il 07/01/19 14:36, Henri Sivonen ha scritto:

> On Fri, Jan 4, 2019 at 2:54 PM Marco Castelluccio
> <mcastelluc...@mozilla.com> wrote:
>> Hi everyone,
>> we have recently enabled collecting code coverage for Rust code too,
> Nice!
>
>> running Rust tests in coverage builds.
> Does this mean running cargo test for each crate under
> third_party/rust, running Firefox test suites or both?

Both. We're running Rust specific tests (cargo test) like the Rusttests
builds, and we're running the normal test suites.


>
> As for trying to make sense of what the numbers mean:
>
> Is the coverage ratio reported on lines attributed at all in ELF as
> opposed to looking at the number of lines in the source files?

We're using LLVM GCOV instrumentation, which uses debug info.


>
> What kind of expectations one should have on how the system measures
> coverage for code that gets inlined?

Inlining could cause inconsistencies in line counts, but it shouldn't
cause inconsistencies in "is this line covered or not".

We have thought of disabling inlining for coverage builds in the past,
but there is a big runtime cost.

Also, coverage instrumentation by itself increases the size of the
functions, so fewer functions are inlined than in normal debug builds.

- Marco.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to