Skip to content
/ rust Public
forked from rust-lang/rust

Empowering everyone to build reliable and efficient software.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ZhuUx/rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This repository is created for implementating instrumentation-based modified condition/decision coverage in rust compiler based on llvm.

It is still under development and waiting for more tests. All changes are committed to the master branch.

Roadmap

See the track issure

Quick start

To run tests

git clone https://github.com/ZhuUx/rust.git
git checkout master
./x build --stage 1
./x test tests/coverage/mcdc_if.rs

To check code of foo

export PATH=path/to/llvm-build:$PATH
rustup toolchain link mcdc build/host/stage1
cargo +mcdc rustc --bin foo -- -Cinstrument-coverage -Zcoverage-options=mcdc
cd target/debug
LLVM_PROFILE_FILE="foo.profraw" ./foo
llvm-profdata merge -sparse foo.profraw -o foo.profdata   
llvm-cov show ./foo -instr-profile=foo.profdata --show-mcdc

Note that if a custom llvm is used, the llvm version should be 18 or later.

Acknowledgment & Credits

This repository only contains works by Banma. But mcdc implementation for rust also is co-authored by RenjiSann from Adacore, Zalathar.

evodius96 lands mcdc implementation on llvm and clarifies the details.

implements branch coverage, which introduces essential base for mcdc, and reviews a lot.

Ferrous shares their research about mcdc in rust.

About

Empowering everyone to build reliable and efficient software.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 97.1%
  • JavaScript 0.5%
  • Shell 0.5%
  • Fluent 0.4%
  • HTML 0.3%
  • Python 0.3%
  • Other 0.9%