add check script for regression testing
Run the fuzz targets over the seed corpus with the standalone driver as part of the test suite.
This commit is contained in:
parent
f3cdf25923
commit
f2745e19c9
@ -1,3 +1,6 @@
|
||||
TESTS = \
|
||||
test_fuzz.sh
|
||||
|
||||
FUZZPROGS = \
|
||||
jpegsave_buffer_fuzzer \
|
||||
pngsave_buffer_fuzzer \
|
||||
@ -16,5 +19,7 @@ LDADD = ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ @LIB_FUZZING_ENGINE@
|
||||
|
||||
libstandaloneengine_a_SOURCES = StandaloneFuzzTargetMain.c
|
||||
|
||||
noinst_PROGRAMS = $(FUZZPROGS)
|
||||
check_PROGRAMS = $(FUZZPROGS)
|
||||
noinst_LIBRARIES = $(FUZZLIBS)
|
||||
|
||||
EXTRA_DIST = $(TESTS)
|
||||
|
0
fuzz/jpegsave_buffer_fuzzer_corpus/.keep
Normal file
0
fuzz/jpegsave_buffer_fuzzer_corpus/.keep
Normal file
0
fuzz/pngsave_buffer_fuzzer_corpus/.keep
Normal file
0
fuzz/pngsave_buffer_fuzzer_corpus/.keep
Normal file
0
fuzz/sharpen_fuzzer_corpus/.keep
Normal file
0
fuzz/sharpen_fuzzer_corpus/.keep
Normal file
20
fuzz/test_fuzz.sh
Executable file
20
fuzz/test_fuzz.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
#set -x
|
||||
set -e
|
||||
|
||||
# Glib is build without -fno-omit-frame-pointer. We need
|
||||
# to disable the fast unwinder to get full stacktraces.
|
||||
export ASAN_OPTIONS="fast_unwind_on_malloc=0:allocator_may_return_null=1"
|
||||
|
||||
# Hide all warning messages from vips.
|
||||
export VIPS_WARNING=0
|
||||
|
||||
ret=0
|
||||
|
||||
for fuzzer in *_fuzzer; do
|
||||
find "${fuzzer}_corpus" -type f -not -empty -print0 \
|
||||
| xargs -0 -n1 "./$fuzzer" || ret=1
|
||||
done
|
||||
|
||||
exit $ret
|
0
fuzz/thumbnail_fuzzer_corpus/.keep
Normal file
0
fuzz/thumbnail_fuzzer_corpus/.keep
Normal file
0
fuzz/webpsave_buffer_fuzzer_corpus/.keep
Normal file
0
fuzz/webpsave_buffer_fuzzer_corpus/.keep
Normal file
Loading…
Reference in New Issue
Block a user