Add Continuous Fuzzing Integration to Fuzzit (#3093)

This feature introduce continuous fuzzing with the following
features:

* Ruzzing: fuzz-targets are run continuously on master
( the fuzzers are updated every time new code is pushed to master)
* Regresion: In addition to unit-tests travis runs all fuzz
targets through the generated corpus to catch bugs early  on
in the CI process before merge.
This commit is contained in:
Yevgeny Pats
2019-08-18 11:40:59 +03:00
committed by Miek Gieben
parent bbc78abf6f
commit c33fc9e3b0
4 changed files with 46 additions and 5 deletions

View File

@@ -44,6 +44,26 @@ ifeq ($(TEST_TYPE),coverage)
fi; \
done
endif
ifeq ($(TEST_TYPE),fuzzit)
# skip fuzzing for PR
if [ "$(TRAVIS_PULL_REQUEST)" = "false" ] || [ "$(FUZZIT_TYPE)" = "local-regression" ] ; then \
export GO111MODULE=off; \
go get -u github.com/dvyukov/go-fuzz/go-fuzz-build; \
go get -u -v .; \
cd ../../go-acme/lego; \
git checkout v2.5.0; \
cd ../../coredns/coredns; \
LIBFUZZER=YES make -f Makefile.fuzz cache chaos file rewrite whoami corefile; \
wget -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.27/fuzzit_Linux_x86_64; \
chmod a+x fuzzit; \
./fuzzit create job --type $(FUZZIT_TYPE) coredns/cache ./cache; \
./fuzzit create job --type $(FUZZIT_TYPE) coredns/chaos ./chaos; \
./fuzzit create job --type $(FUZZIT_TYPE) coredns/file ./file; \
./fuzzit create job --type $(FUZZIT_TYPE) coredns/rewrite ./rewrite; \
./fuzzit create job --type $(FUZZIT_TYPE) coredns/whoami ./whoami; \
./fuzzit create job --type $(FUZZIT_TYPE) coredns/corefile ./corefile; \
fi;
endif
core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg
GO111MODULE=on go generate coredns.go