Skip to content

Commit

Permalink
refactor: remove redundant nightly config
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Mar 6, 2024
1 parent 38c620d commit 9108b17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/fuzz-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
steps:
- name: Run Fuzz Test
shell: bash
run: cargo +nightly fuzz run ${{ inputs.target }} --fuzz-dir tests-fuzz -- -max_total_time=120
run: cargo fuzz run ${{ inputs.target }} --fuzz-dir tests-fuzz -- -max_total_time=120
env:
GT_MYSQL_ADDR: 127.0.0.1:4002
EOF
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ jobs:
shell: bash
run: |
sudo apt update && sudo apt install -y libfuzzer-12-dev
rustup install nightly
cargo +nightly install cargo-fuzz
cargo install cargo-fuzz
- name: Download pre-built binaries
uses: actions/download-artifact@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions tests-fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ cargo install cargo-fuzz
## Run
1. List all fuzz targets
```bash
cargo +nightly fuzz list --fuzz-dir tests-fuzz
cargo fuzz list --fuzz-dir tests-fuzz
```

2. Run a fuzz target.
```bash
cargo +nightly fuzz run fuzz_create_table --fuzz-dir tests-fuzz
cargo fuzz run fuzz_create_table --fuzz-dir tests-fuzz
```

## Crash Reproduction
Expand All @@ -31,11 +31,11 @@ echo "Base64" > .crash
Print the `std::fmt::Debug` output for an input.

```bash
cargo +nightly fuzz fmt fuzz_target .crash --fuzz-dir tests-fuzz
cargo fuzz fmt fuzz_target .crash --fuzz-dir tests-fuzz
```
Rerun the fuzz test with the input.

```bash
cargo +nightly fuzz run fuzz_target .crash --fuzz-dir tests-fuzz
cargo fuzz run fuzz_target .crash --fuzz-dir tests-fuzz
```
For more details, visit [cargo fuzz](https://rust-fuzz.github.io/book/cargo-fuzz/tutorial.html) or run the command `cargo fuzz --help`.

0 comments on commit 9108b17

Please sign in to comment.