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

Test-drive grcov for coverage reports #433

Closed
garious opened this issue Jun 24, 2018 · 6 comments
Closed

Test-drive grcov for coverage reports #433

garious opened this issue Jun 24, 2018 · 6 comments
Assignees

Comments

@garious
Copy link
Contributor

garious commented Jun 24, 2018

@marco-c advises grcov over llvm-cov for coverage reports. Test-drive it. Compare and contrast.

@garious
Copy link
Contributor Author

garious commented Oct 2, 2018

I've not been able to get grcov or llvm-cov to report coverage from the coverage files output by cargo-cov. Rust doesn't ship with llvm-cov and so I manually installed it via llvm-7, which is what Rust depends on. But still it seems only cargo-cov report knows how to read the files cargo-cov test generates.

@marco-c
Copy link

marco-c commented Oct 2, 2018

That's strange, cargo-cov should simply use -Zprofile, which should be supported by grcov. We are generating coverage reports for grcov itself using -Zprofile (but without cargo-cov).

Mind sending me the gcno/gcda files that you generate, so I can see if grcov is somehow failing to parse them?

@garious
Copy link
Contributor Author

garious commented Oct 3, 2018

Got it working now @marco-c, thanks for the push. The run when I used grcov, I mistakenly ran cargo cov test --lib instead of cargo +nightly test --lib. I'm seeing the same output from your released macOS binary as I do when building it from source (on homebrew's latest llvm package). If I run into any trouble, I'm now in position to send you a PR. :)

@garious
Copy link
Contributor Author

garious commented Oct 5, 2018

@rob-solana, @mvines, @marco-c, code coverage status:

  • cargo +nightly cov test --lib && cargo +nightly cov report works well with on MacOS and Linux with minimal installation dependencies. It's just a little odd that it requires clang's libprofile to be installed. Not sure why that wouldn't be distributed with Rust.
  • grcov and lcov works great on MacOS but not on Linux. Their Linux build is using Trusty whereas we run on Stretch, so surprised to see an issue there.
  • I upload both the cargo-cov and lcov-via-grcov HTML reports to buildkite and we can see that grcov us unable to generate a report using the same gcno files that cargo-cov is using (and generated).
  • codecov.io can consume the lcov.info file that grcov outputs, so as soon as that's working, we should have codecov.io and those nice coverage PR comments back again.

@rob-solana
Copy link
Contributor

so good...

test driving it on WSL

@marco-c
Copy link

marco-c commented Oct 9, 2018

I upload both the cargo-cov and lcov-via-grcov HTML reports to buildkite and we can see that grcov us unable to generate a report using the same gcno files that cargo-cov is using (and generated).

If you can share the gcnos with me, I can take a look at why grcov is unable to parse them.

mvines added a commit that referenced this issue Jun 15, 2020
vkomenda pushed a commit to vkomenda/solana that referenced this issue Aug 29, 2021
…olana-labs#433)

* Add failing test

* Add Transfer2 to failing test

* Add source-delegate to failing test

* No need to hold source RefMut in process_transfer

* Fixup comments

* Add destination-owner test case

* Add source-multisig test case
vkomenda pushed a commit to vkomenda/solana that referenced this issue Aug 29, 2021
brooksprumo added a commit to brooksprumo/solana that referenced this issue Mar 26, 2024
TESLA-SATI referenced this issue in TESLA-SATI/solana May 7, 2024
This was erronously deemed as unnecessary and removed in:
anza-xyz#864

The commit partially reverts solana-labs#864 and adds back socket-addr dedup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants