fuzzing: Run local fuzz targets on given corpora during make check
The base directory of the corpora must be set in FUZZING_CORPORA.
This commit is contained in:
@@ -20,3 +20,10 @@ fuzz_certs: fuzz_certs.c ${libfuzzer}
|
|||||||
noinst_LIBRARIES = libFuzzerLocal.a
|
noinst_LIBRARIES = libFuzzerLocal.a
|
||||||
libFuzzerLocal_a_SOURCES = libFuzzerLocal.c
|
libFuzzerLocal_a_SOURCES = libFuzzerLocal.c
|
||||||
libFuzzerLocal_a_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
|
libFuzzerLocal_a_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
|
||||||
|
|
||||||
|
check: all
|
||||||
|
for f in $(FUZZ_TARGETS); do \
|
||||||
|
corpus=$${f#fuzz_}; \
|
||||||
|
corpus=$${corpus%%_*}; \
|
||||||
|
./$$f $(FUZZING_CORPORA)/$${corpus}/*; \
|
||||||
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user