Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase code coverage for unit tests of up-transport-vsomeip to 90% #15

Open
PLeVasseur opened this issue Jul 18, 2024 · 2 comments
Open
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@PLeVasseur
Copy link
Contributor

No description provided.

@PLeVasseur PLeVasseur added enhancement New feature or request good first issue Good for newcomers labels Jul 18, 2024
@PLeVasseur PLeVasseur added this to the v1.6.0-alpha.4 milestone Jul 31, 2024
@PLeVasseur PLeVasseur changed the title Increase code coverage for unit tests of up-transport-vsomeip Increase code coverage for unit tests of up-transport-vsomeip to 90% Jul 31, 2024
@kz9nyy
Copy link

kz9nyy commented Aug 8, 2024

Please assign this to me!

@kz9nyy
Copy link

kz9nyy commented Aug 15, 2024

I evaluated tarpaulin and llvm-cov unit test coverage tools.

I prefer llvm-cov for the following reasons:
The syntax highlighting was more intuitive.
The coverage summary appears more comprehensive using default settings, i.e. function, line and region coverage percentages.
It uses LLVM source-based code coverage. This is theoretically faster and more accurate due to the fact that Rust by default uses LLVM as its backend compiler.
Capable of generating html and lcov report standard formats.
It offers some additional nice-to-have features such as branch coverage, which can be enabled using a nightly Rust build.

Perhaps, one major setback of tarpaulin is that it relies on kcov and ptrace system calls to collect debug info to calculate coverage. Firstly, kcov and ptrace are only available on Linux.
Secondly, this method is known to produce less accurate results compared to LLVM's native, efficient coverage instrumentation.

I observed some discrepancies when comparing the reports, which led me to believe that LLVM's instrumentation is indeed more precise.

@PLeVasseur PLeVasseur modified the milestone: v1.6.0-alpha.4 Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Ready
Development

No branches or pull requests

2 participants