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

Inquiry Regarding Test Coverage for Custom Test Suite on Rust Compiler #1

Open
Ghy0202 opened this issue Nov 9, 2023 · 0 comments
Open

Comments

@Ghy0202
Copy link

Ghy0202 commented Nov 9, 2023

Hi~ I am a computer science student who recently started exploring the Rust programming language. I came across your impressive fuzzing project, specifically aimed at the Rust compiler.

I am currently facing a challenge related to an assignment given by my professor, which requires me to obtain test coverage for a custom test suite on rustc. After referring to the Rustc development manual and the readme file of the Rustsmith project, I attempted to use grcov to measure the coverage of my own test suite on rustc, but unfortunately, I was not successful.

Here is the approach I followed:

I built rustc from the source code of the Rust compiler(simply follow the README of rustc).
Then, I used the following command:

grcov /home/trst_cov/*.profraw -s /home/rust/compiler -b /home/rust/install/bin -t html -o ./

In this command, /home/trst_cov/*.profraw was generated using the script provided below

/home/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc -Cinstrument-coverage -Zprofile code.rs

However, the generated ./html directory only contained the index.html file, and I couldn't find the coverage information for the rustc source code. I am wondering where I might have gone wrong in this process and how I can obtain test coverage for my own test suite on rustc.

I would be extremely grateful if you could provide me with some guidance on this matter. Your expert advice and insights would be highly appreciated.

Thank you very much for your time and consideration. I look forward to your response.( •̀ ω •́ )✧

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