test(fuzz): New shell script to build a corpus with a progressively increasing size limit

This commit is contained in:
Chris Hennick 2024-06-22 17:38:09 -07:00
parent b6e0a0693b
commit 1dead5bc03
No known key found for this signature in database
GPG key ID: DA47AABA4961C509
2 changed files with 11 additions and 1 deletions

View file

@ -17,4 +17,4 @@ for i in $(seq 1 $RESTARTS); do
mv "fuzz/corpus/fuzz_$1_restart_${i}"/* "fuzz/corpus/fuzz_$1"
rmdir "fuzz/corpus/fuzz_$1_restart_${i}"
done
./fuzz-until-converged.sh $1 $2
./fuzz-until-converged.sh "$1" "$2"

View file

@ -0,0 +1,10 @@
#!/bin/bash
mkdir "fuzz/corpus/fuzz_$1_recombination_sources" || true
mv "fuzz/corpus/fuzz_$1/*" "fuzz/corpus/fuzz_$1_recombination_sources"
for size in "${@:2}"; do
rm -rf "fuzz/corpus/fuzz_$1_pre_fresh_blood"
./build-fuzz-corpus-multiple-restarts.sh "$1" "$size"
find "fuzz/corpus/fuzz_$1_pre_fresh_blood" -type -f -size "-${size}c" -exec mv '{}' "fuzz/corpus/fuzz_$1" ';'
find "fuzz/corpus/fuzz_$1_recombination_sources" -type -f -size "-${size}c" -exec mv '{}' "fuzz/corpus/fuzz_$1" ';'
./fuzz-until-converged.sh "$1" "$size"
done