aboutsummaryrefslogtreecommitdiff
path: root/Makefile.fuzz
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-08-19 08:06:25 +0000
committerGravatar GitHub <noreply@github.com> 2019-08-19 08:06:25 +0000
commit6f028d04278fb9dc9a67e125c507ee5252b8d859 (patch)
tree504d7471e44e9471a5f957a48e15d368dad8049e /Makefile.fuzz
parent6fa61119bd4e62808b7c3ad6a417ca4a9ea5fb83 (diff)
downloadcoredns-6f028d04278fb9dc9a67e125c507ee5252b8d859.tar.gz
coredns-6f028d04278fb9dc9a67e125c507ee5252b8d859.tar.zst
coredns-6f028d04278fb9dc9a67e125c507ee5252b8d859.zip
fuzz: some cleanups (#3143)
* fuzz: some cleanups Signed-off-by: Miek Gieben <miek@miek.nl> * smaller Signed-off-by: Miek Gieben <miek@miek.nl> * documentation Signed-off-by: Miek Gieben <miek@miek.nl> * comments Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'Makefile.fuzz')
-rw-r--r--Makefile.fuzz18
1 files changed, 12 insertions, 6 deletions
diff --git a/Makefile.fuzz b/Makefile.fuzz
index b2340c420..4d5189720 100644
--- a/Makefile.fuzz
+++ b/Makefile.fuzz
@@ -1,5 +1,7 @@
# Makefile for fuzzing
#
+# With https://app.fuzzit.dev/ we are continuously fuzzing CoreDNS.
+#
# Use go-fuzz and needs the tools installed. For each fuzz.go in a plugin's directory
# you can start the fuzzing with: make -f Makefile.fuzz <plugin>
# e.g.
@@ -9,11 +11,13 @@
# Each plugin that wants to join the fuzzing fray only needs to add a fuzz.go that calls
# the plugins's ServeDNS and used the plugin/pkg/fuzz for the Do function.
#
-# Installing go-fuzz
-#$ go get github.com/dvyukov/go-fuzz/go-fuzz
-#$ go get github.com/dvyukov/go-fuzz/go-fuzz-build
+# Installing go-fuzz is very tricky because it does not support Go modules, see the `Makefile`
+# for the current trickery. The following may do the trick:
+#
+# GO111MODULE=off go get github.com/dvyukov/go-fuzz/go-fuzz-build
REPO:="github.com/coredns/coredns"
+FUZZIT:=v2.4.28
# set LIBFUZZER=YES to build libfuzzer compatible targets
FUZZ:=$(dir $(wildcard plugin/*/fuzz.go)) # plugin/cache/
@@ -22,7 +26,9 @@ PLUGINS:=$(foreach f,$(PLUGINS),$(subst /, ,$(f))) # > cache
.PHONY: echo
echo:
- @echo fuzz targets: $(PLUGINS)
+ @echo $(PLUGINS) corefile
+
+all: $(PLUGINS) corefile
.PHONY: $(PLUGINS)
$(PLUGINS): echo
@@ -34,7 +40,6 @@ else
go-fuzz -bin=./$(@)-fuzz.zip -workdir=fuzz/$(@)
endif
-
.PHONY: corefile
corefile:
ifeq ($(LIBFUZZER), YES)
@@ -45,7 +50,8 @@ else
go-fuzz -bin=./test-fuzz.zip -workdir=fuzz/$(@)
endif
-
+fuzzit:
+ wget -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/$(FUZZIT)/fuzzit_Linux_x86_64 && chmod +x fuzzit
.PHONY: clean
clean: