From fd05208762c04a8a85cfe268361a09dae3783098 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 10 Dec 2017 13:20:32 +0000 Subject: [PATCH] fuzz_testing: allow automatically resuming an interrupted job --- contrib/fuzz_testing/fuzz.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/fuzz_testing/fuzz.sh b/contrib/fuzz_testing/fuzz.sh index c339ceeed..dea09e64c 100755 --- a/contrib/fuzz_testing/fuzz.sh +++ b/contrib/fuzz_testing/fuzz.sh @@ -18,5 +18,12 @@ case "$type" in *) echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json"; exit 1 ;; esac +if test -d "fuzz-out/$type" +then + dir="-" +else + dir="tests/data/fuzz/$type" +fi + mkdir -p fuzz-out -afl-fuzz -i tests/data/fuzz/$type -m none -t 250 -o fuzz-out/$type build/fuzz/tests/fuzz/${type}_fuzz_tests @@ +afl-fuzz -i "$dir" -m none -t 250 -o fuzz-out/$type build/fuzz/tests/fuzz/${type}_fuzz_tests @@