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

add coverage #2

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
92 changes: 46 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Schedfuzz


### run fuzz
```sh
# Install component and tools (require rust nightly)
$ rustup component add llvm-tools-preview --toolchain nightly
$ cargo install cargo-binutils
$ cargo install rustfilt

# Run fuzz
$ cargo +nightly fuzz run -j$(nproc) fuzz_target_1
# Run fuzz: fuzz_tx_consistency
$ cargo +nightly fuzz run -j$(nproc) fuzz_tx_consistency

# Generate coverage report
$ cargo +nightly fuzz coverage fuzz_target_1
$ cargo +nightly cov -- show target/x86_64-unknown-linux-gnu/coverage/x86_64-unknown-linux-gnu/release/fuzz_target_1 --Xdemangler=rustfilt --format=html -instr-profile=fuzz/coverage/fuzz_target_1/coverage.profdata --line-coverage-gt=1 --name=ckb_script > res/report.html
$ cargo +nightly fuzz coverage fuzz_tx_consistency
$ cargo +nightly cov -- show target/x86_64-unknown-linux-gnu/coverage/x86_64-unknown-linux-gnu/release/fuzz_tx_consistency --Xdemangler=rustfilt --format=html -instr-profile=fuzz/coverage/fuzz_tx_consistency/coverage.profdata --line-coverage-gt=1 --name=ckb_script > res/report.html
```

### update corpus
After running any fuzzing tests, all corpus should be compacted via:
```sh
$ cargo +nightly fuzz cmin fuzz_tx_consistency
```
Then commit the corpus changes for future use.
Loading
Loading