test(fuzz): Refactor: delete duplicate inputs of size 0..=2

This commit is contained in:
Chris Hennick 2024-06-22 20:35:11 -07:00
parent f18c2e3054
commit 1e0f6e77e5
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -3,6 +3,7 @@ set -euxo pipefail
mkdir "fuzz/corpus/fuzz_$1_recombination_sources" || true
# Ensure all 0-byte, 1-byte and 2-byte strings are eligible for recombination
find "fuzz/corpus/fuzz_$1_recombination_sources" -type f -size -2c -delete
touch fuzz/corpus/fuzz_write_recombination_sources/empty
for i in $(seq 0 255); do
printf "%02X" "$i" | xargs -n 1 -I '{}' sh -c 'echo {} | xxd -r -p > fuzz/corpus/fuzz_write_recombination_sources/{}'