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

Merging raw coverage files failed / links to "installing llvm coverage tools" dead #300

Open
bluenote10 opened this issue Apr 17, 2022 · 1 comment

Comments

@bluenote10
Copy link

I was following this tutorial, but running cargo +nightly fuzz coverage <my-fuzz-target> failed with:

Merging raw coverage data...
Error: Merging raw coverage files failed.

Do you have LLVM coverage tools installed?
https://doc.rust-lang.org/beta/unstable-book/compiler-flags/source-based-code-coverage.html#installing-llvm-coverage-tools

Caused by:
    0: Failed to run command: "/home/me/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata" "merge" "-sparse" "/home/me/git/RustExperiments/SerdeChecks/fuzz/coverage/deserialize/raw" "-o" "/home/me/git/RustExperiments/SerdeChecks/fuzz/coverage/deserialize/coverage.profdata"
    1: No such file or directory (os error 2)

I'm wondering why it is trying to use llvm-profdata from that path, which is indeed non-existing. In general which llvm-profdata would point to the right location.

Unfortunately, the relevant link (https://doc.rust-lang.org/beta/unstable-book/compiler-flags/source-based-code-coverage.html#installing-llvm-coverage-tools) that is mentioned both in the error, but also in the tutorial seems to be dead.

@bluenote10
Copy link
Author

I looks like I got it to work via:

cargo install cargo-binutils
rustup +nightly component add llvm-tools-preview

I assume that this was the missing piece in the documentation.

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

1 participant