-
Notifications
You must be signed in to change notification settings - Fork 37
/
fuzz_test.go
46 lines (39 loc) · 993 Bytes
/
fuzz_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//go:build go1.18
// +build go1.18
package rtnetlink
import "testing"
// FuzzLinkMessage will fuzz a LinkMessage
func FuzzLinkMessage(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
m := &LinkMessage{}
_ = m.UnmarshalBinary(data)
})
}
// FuzzAddressMessage will fuzz an AddressMessage
func FuzzAddressMessage(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
m := &LinkMessage{}
_ = m.UnmarshalBinary(data)
})
}
// FuzzNeighMessage will fuzz a NeighMessage
func FuzzNeighMessage(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
m := &LinkMessage{}
_ = m.UnmarshalBinary(data)
})
}
// FuzzRouteMessage will fuzz a RouteMessage
func FuzzRouteMessage(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
m := &LinkMessage{}
_ = m.UnmarshalBinary(data)
})
}
// FuzzRuleMessage will fuzz a RuleMessage
func FuzzRuleMessage(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
m := &RuleMessage{}
_ = m.UnmarshalBinary(data)
})
}