mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-27 16:32:54 +00:00
* chore: update toolchain to nightly-2024-04-17 Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix test clippy Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix ut Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update fuzz test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update to nightly-2024-04-18 Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add document Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update CI Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * avoid unnecessary allow clippy attrs Signed-off-by: tison <wander4096@gmail.com> * help the compiler find the clone is unnecessary and make clippy happy Signed-off-by: tison <wander4096@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com> Signed-off-by: tison <wander4096@gmail.com> Co-authored-by: tison <wander4096@gmail.com>
Fuzz Test for GreptimeDB
Setup
- Install the fuzz cli first.
cargo install cargo-fuzz
- Start GreptimeDB
- Copy the
.env.example, which is at project root, to.envand change the values on need.
Run
- List all fuzz targets
cargo fuzz list --fuzz-dir tests-fuzz
- Run a fuzz target.
cargo fuzz run fuzz_create_table --fuzz-dir tests-fuzz
Crash Reproduction
If you want to reproduce a crash, you first need to obtain the Base64 encoded code, which usually appears at the end of a crash report, and store it in a file.
Alternatively, if you already have the crash file, you can skip this step.
echo "Base64" > .crash
Print the std::fmt::Debug output for an input.
cargo fuzz fmt fuzz_target .crash --fuzz-dir tests-fuzz
Rerun the fuzz test with the input.
cargo fuzz run fuzz_target .crash --fuzz-dir tests-fuzz
For more details, visit cargo fuzz or run the command cargo fuzz --help.