fuzz: use "fuzz" directory instead of "examples"

This commit is contained in:
Aleksandr Razumov
2018-08-01 19:32:01 +03:00
parent d905e9f513
commit 2244bb2be5
49 changed files with 8 additions and 8 deletions

View File

@@ -18,15 +18,15 @@ fuzz-prepare-typ:
fuzz-prepare-setters:
go-fuzz-build -func FuzzSetters -o stun-setters-fuzz.zip github.com/gortc/stun
fuzz-msg:
go-fuzz -bin=./stun-msg-fuzz.zip -workdir=examples/stun-msg
go-fuzz -bin=./stun-msg-fuzz.zip -workdir=fuzz/stun-msg
fuzz-typ:
go-fuzz -bin=./stun-typ-fuzz.zip -workdir=examples/stun-typ
go-fuzz -bin=./stun-typ-fuzz.zip -workdir=fuzz/stun-typ
fuzz-setters:
go-fuzz -bin=./stun-setters-fuzz.zip -workdir=examples/stun-setters
go-fuzz -bin=./stun-setters-fuzz.zip -workdir=fuzz/stun-setters
fuzz-test:
go test -tags gofuzz -run TestFuzz -v .
fuzz-reset-setters:
rm -f -v -r stun-setters-fuzz.zip examples/stun-setters
rm -f -v -r stun-setters-fuzz.zip fuzz/stun-setters
lint:
@echo "linting on $(PROCS) cores"
@gometalinter \

View File

@@ -1,3 +0,0 @@
# Fuzzer corpus
examples directory contains corpus for fuzzer.

3
fuzz/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Fuzzer corpus
fuzz directory contains corpus for fuzzer.

View File

@@ -21,7 +21,7 @@ func TestMessageCrash2(t *testing.T) {
func corpus(t *testing.T, function, typ string) [][]byte {
var data [][]byte
p := filepath.Join("examples", function, typ)
p := filepath.Join("fuzz", function, typ)
f, err := os.Open(p)
if err != nil {
if os.IsNotExist(err) {