test(fuzz): Bug fix: need to move corpora after special restarts

This commit is contained in:
Chris Hennick 2024-06-23 09:06:37 -07:00
parent ab659a3652
commit 602c92fed9
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -23,6 +23,7 @@ mkdir "fuzz/corpus/fuzz_$1_restart_dictionaryless" || true
echo "$(date): DICTIONARY-LESS RESTART"
cargo fuzz run --all-features "fuzz_$1" "fuzz/corpus/fuzz_$1" -- \
-max_len="$2" -fork="$ncpus" -max_total_time=5100 -runs=100000000
mv "fuzz/corpus/fuzz_$1"/* "fuzz/corpus/fuzz_$1_restart_dictionaryless"
mv "fuzz/corpus/fuzz_$1_restart_dictionaryless_012byte"/* "fuzz/corpus/fuzz_$1_pre_fresh_blood" || true
rm -rf "fuzz/corpus/fuzz_$1_restart_dictionaryless_012byte" || true
@ -31,6 +32,7 @@ echo "$(date): DICTIONARY-LESS RESTART WITH 0-2 BYTE CORPUS"
tar -xvzf "fuzz/012byte.tar.gz" -C "fuzz/corpus/fuzz_$1"
cargo fuzz run --all-features "fuzz_$1" "fuzz/corpus/fuzz_$1" -- \
-max_len="$2" -fork="$ncpus" -max_total_time=5100 -runs=100000000
mv "fuzz/corpus/fuzz_$1"/* "fuzz/corpus/fuzz_$1_restart_dictionaryless_012byte"
mv "fuzz/corpus/fuzz_$1_restart_012byte"/* "fuzz/corpus/fuzz_$1_pre_fresh_blood" || true
rm -rf "fuzz/corpus/fuzz_$1_restart_012byte" || true
@ -39,6 +41,7 @@ echo "$(date): RESTART WITH DICTIONARY AND 0-2 BYTE CORPUS"
tar -xvzf "fuzz/012byte.tar.gz" -C "fuzz/corpus/fuzz_$1"
cargo fuzz run --all-features "fuzz_$1" "fuzz/corpus/fuzz_$1" -- \
-dict=fuzz/fuzz.dict -max_len="$2" -fork="$ncpus" -max_total_time=5100 -runs=100000000
mv "fuzz/corpus/fuzz_$1"/* "fuzz/corpus/fuzz_$1_restart_012byte"
echo "$(date): MERGING CORPORA"
for i in $(seq 1 $NORMAL_RESTARTS); do