[#216] netmap: Add policy decode fuzz test

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-05-02 17:13:08 +03:00 committed by Evgenii Stratonikov
parent 99e02858af
commit 02c936f397
5 changed files with 48 additions and 16 deletions

View 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)
})
}