File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
fuzzers/inprocess/libfuzzer_stb_image_sugar Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,26 @@ run: fuzzer
35
35
[macos ]
36
36
test : fuzzer
37
37
#!/ bin/ bash
38
+ success=0
38
39
rm -rf libafl_unix_shmem_server || true
39
- (timeout 31 s ./ {{FUZZER_NAME}} | tee fuzz_stdout.log 2 >/ dev/ null || true ) &
40
+ (timeout 5 s ./ {{FUZZER_NAME}} > fuzz_stdout.log 2 >/ dev/ null || true ) &
40
41
sleep 0.2
41
- timeout 30 s ./ {{ FUZZER_NAME}} >/ dev/ null 2 >/ dev/ null || true
42
- if grep -qa " corpus: 30" fuzz_stdout.log; then
43
- echo " Fuzzer is working"
42
+ timeout 5 s ./ {{ FUZZER_NAME}} >/ dev/ null 2 >/ dev/ null || true
43
+ while read -r line; do
44
+ corpus_number=$(echo " $line" | cut -d' ' -f2)
45
+ if (( corpus_number > 50 )); then
46
+ success=1
47
+ fi
48
+ done < <(grep -o ' corpus: [0-9]\+' fuzz_stdout.log)
49
+
50
+ if [ " $success" -eq 1 ]; then
51
+ echo " Fuzzer is working!"
52
+ exit 0
44
53
else
45
- echo " Fuzzer does not generate any testcases or any crashes "
54
+ echo " Fuzzer not working! "
46
55
exit 1
47
56
fi
48
-
57
+
49
58
clean :
50
59
#!/ bin/ bash
51
60
rm -f {{ FUZZER_NAME}}
You can’t perform that action at this time.
0 commit comments