mirror of
https://github.com/gortc/stun.git
synced 2025-12-24 12:57:54 +08:00
fuzz: use "fuzz" directory instead of "examples"
This commit is contained in:
8
Makefile
8
Makefile
@@ -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 \
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Fuzzer corpus
|
||||
|
||||
examples directory contains corpus for fuzzer.
|
||||
3
fuzz/README.md
Normal file
3
fuzz/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Fuzzer corpus
|
||||
|
||||
fuzz directory contains corpus for fuzzer.
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user