smat is a framework that provides state machine assisted fuzz testing.
To run the smat tests for moss...
$ go get github.com/dvyukov/go-fuzz/go-fuzz
$ go get github.com/dvyukov/go-fuzz/go-fuzz-build
- Generate initial smat corpus:
go test -tags=gofuzz -run=TestGenerateSmatCorpus
- Build go-fuzz test program with instrumentation:
go-fuzz-build github.com/couchbase/moss
- Run go-fuzz:
go-fuzz -bin=./moss-fuzz.zip -workdir=workdir/ -timeout=2000