1# Instructions for smat testing for plasma
2
3[smat](https://github.com/mschoch/smat) is a framework that provides
4state machine assisted fuzz testing.
5
6To run the smat tests for plasma...
7
8## Prerequisites
9
10    $ go get github.com/dvyukov/go-fuzz/go-fuzz
11    $ go get github.com/dvyukov/go-fuzz/go-fuzz-build
12
13## Steps
14
151.  Generate initial smat corpus:
16```
17    go test -tags=gofuzz -run=TestGenerateSmatCorpus
18```
19
202.  Build go-fuzz test program with instrumentation:
21```
22    go-fuzz-build github.com/couchbase/indexing/secondary/indexer/plasmatests
23```
24
253.  Run go-fuzz:
26```
27    go-fuzz -bin=./indexer-fuzz.zip -workdir=workdir/ -timeout=2000
28```
29