aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-05-30 16:46:32 +0200
committerTobias Brunner <tobias@strongswan.org>2017-08-15 10:35:20 +0200
commit9f2e74cfbb5d8bc9b17f076718890ca14f4448cc (patch)
treeb557af36ff3c6d186fdbf93d1021886ffb0f3dec /fuzz
parentbe1beea7a4faf78ed613631f97f6c83c2cc08529 (diff)
downloadstrongswan-9f2e74cfbb5d8bc9b17f076718890ca14f4448cc.tar.bz2
strongswan-9f2e74cfbb5d8bc9b17f076718890ca14f4448cc.tar.xz
fuzzing: Run local fuzz targets on given corpora during `make check`
The base directory of the corpora must be set in FUZZING_CORPORA.
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am
index 6d3d83ff7..927ace78b 100644
--- a/fuzz/Makefile.am
+++ b/fuzz/Makefile.am
@@ -20,3 +20,10 @@ fuzz_certs: fuzz_certs.c ${libfuzzer}
noinst_LIBRARIES = libFuzzerLocal.a
libFuzzerLocal_a_SOURCES = libFuzzerLocal.c
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