Skip to content

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

Open
@Ghy0202

Description

@Ghy0202

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.( •̀ ω •́ )✧

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions