Skip to content

Latest commit

 

History

History

fuzz

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

fuzz

WIP fuzz testing. Not super useful yet.

Installing cargo-fuzz

cargo install cargo-fuzz

Fuzzing sqllogictest

Before first use:

cd fuzz
cargo run --bin=build_corpus

To fuzz stuff:

RUSTFLAGS='-C codegen-units=1' cargo +nightly fuzz run --release fuzz_sqllogictest -- -dict=fuzz/sql.dict

Failing tests are added to ./fuzz/artifacts/fuzz_sqllogictest and can be rerun with cargo test -p sqllogictest.

TODO(jamii): figure out why sqllogictest::test::fuzz_artifacts can't be run by name.

Fuzzing testdrive

Before first use:

mkdir -p fuzz/corpus/fuzz_testdrive
cp -R test/* fuzz/corpus/fuzz_testdrive

To fuzz stuff:

RUSTFLAGS='-C codegen-units=1' cargo +nightly fuzz run --release fuzz_testdrive

Failing tests are added to ./fuzz/artifacts/fuzz_testdrive and can be rerun with cargo run --bin testdrive ./fuzz/artificats/fuzz_testdrive/<FAILING_TEST>.