[#216] netmap: Add policy decode fuzz test
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
99e02858af
commit
02c936f397
5 changed files with 48 additions and 16 deletions
17
netmap/policy_fuzz_test.go
Normal file
17
netmap/policy_fuzz_test.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
//go:build gofuzz
|
||||
// +build gofuzz
|
||||
|
||||
package netmap
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func FuzzDecodeString(f *testing.F) {
|
||||
for _, pp := range validPlacementPolicy {
|
||||
f.Add([]byte(pp))
|
||||
}
|
||||
f.Fuzz(func(t *testing.T, data []byte) {
|
||||
DoFuzzPlacementPolicyDecode(data)
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue