From: Alan T. DeKok Date: Sun, 17 Jan 2021 15:01:44 +0000 (-0500) Subject: add "test.fuzzer" target in order to do fuzzer tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e70537e57d620201a9534d40cba9e91bcbd14cd2;p=thirdparty%2Ffreeradius-server.git add "test.fuzzer" target in order to do fuzzer tests --- diff --git a/src/bin/all.mk b/src/bin/all.mk index fc52b211120..01e0fb18877 100644 --- a/src/bin/all.mk +++ b/src/bin/all.mk @@ -48,8 +48,10 @@ fuzzer.help: @for _p in $(PROTOCOLS); do echo " make fuzzer.$$_p"; done @echo +test.fuzzer: $(addprefix test.fuzzer.,$(FUZZER_PROTOCOLS)) + else .PHONY: fuzzer.help $(foreach X,${FUZZER_PROTOCOLS},fuzzer.${X}) -fuzzer.help $(foreach X,${FUZZER_PROTOCOLS},fuzzer.${X}): +fuzzer.help $(foreach X,${FUZZER_PROTOCOLS},fuzzer.${X}) test.fuzzer: @echo "The server MUST be built with '--enable-llvm-fuzzer-sanitizer'" endif diff --git a/src/bin/fuzzer.mk b/src/bin/fuzzer.mk index 6f2b530615b..2ecc45401f9 100644 --- a/src/bin/fuzzer.mk +++ b/src/bin/fuzzer.mk @@ -50,3 +50,9 @@ src/tests/fuzzer-corpus/$(PROTOCOL): # fuzzer.$(PROTOCOL): ./build/bin/local/fuzzer_$(PROTOCOL) | src/tests/fuzzer-corpus/$(PROTOCOL) ${Q}$(TEST_BIN)/fuzzer_$(PROTOCOL) -max_len=512 -D share/dictionary src/tests/fuzzer-corpus/$(PROTOCOL) + +# +# tests add a 10s timeout. This is so that we can see if the fuzzers run _at all_. +# +test.fuzzer.$(PROTOCOL): ./build/bin/local/fuzzer_$(PROTOCOL) | src/tests/fuzzer-corpus/$(PROTOCOL) + ${Q}$(TEST_BIN)/fuzzer_$(PROTOCOL) -max_len=512 -timeout=10 -D share/dictionary src/tests/fuzzer-corpus/$(PROTOCOL)