test(fuzz): Bug fix: some files were landing in nested folders

This commit is contained in:
Chris Hennick 2024-06-22 19:02:09 -07:00
parent b2afd7aa00
commit 958f4a1c10
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -5,12 +5,14 @@ ncpus=$(( ncpus / ( 1 + $(cat /sys/devices/system/cpu/smt/active))))
RESTARTS=10
mv "fuzz/corpus/fuzz_$1" "fuzz/corpus/fuzz_$1_pre_fresh_blood" || true
for i in $(seq 1 $RESTARTS); do
mv "fuzz/corpus/fuzz_$1_restart_${i}"/* "fuzz/corpus/fuzz_$1_pre_fresh_blood" || true
echo "RESTART ${i}"
mkdir "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_${i}"
mkdir "fuzz/corpus/fuzz_$1_restart_${i}" || true
mv "fuzz/corpus/fuzz_$1"/* "fuzz/corpus/fuzz_$1_restart_${i}"
done
mkdir "fuzz/corpus/fuzz_$1"
for i in $(seq 1 $RESTARTS); do