test(fuzz): Bug fix: need to recreate directory before copying into it

This commit is contained in:
Chris Hennick 2024-06-23 15:55:36 -07:00
parent 828ce35282
commit 1140f71a88
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -11,6 +11,7 @@ while true; do
if diff "fuzz/corpus/fuzz_$1_iter_${i}.bak" "fuzz/corpus/fuzz_$1_iter_${j}"; then
# Last iteration made no difference, so we're done
rm -r "fuzz/corpus/fuzz_$1"
mkdir "fuzz/corpus/fuzz_$1"
find "fuzz/corpus/fuzz_$1_iter_${j}" -type f -exec mv '{}' "fuzz/corpus/fuzz_$1" ';'
find fuzz/corpus -iname "fuzz_$1_iter_*" -exec rm -r {} +
exit 0