MCPcopy Index your code
hub / github.com/cilium/ebpf / FuzzLoadCollectionSpec

Function FuzzLoadCollectionSpec

fuzz_test.go:9–25  ·  view source on GitHub ↗
(f *testing.F)

Source from the content-addressed store, hash-verified

7)
8
9func FuzzLoadCollectionSpec(f *testing.F) {
10 f.Add([]byte(elf.ELFMAG))
11 f.Fuzz(func(t *testing.T, data []byte) {
12 if len(data) < len(elf.ELFMAG) {
13 t.Skip("input can't be valid ELF")
14 }
15
16 spec, err := LoadCollectionSpecFromReader(bytes.NewReader(data))
17 if err != nil {
18 if spec != nil {
19 t.Fatal("spec is not nil")
20 }
21 } else if spec == nil {
22 t.Fatal("spec is nil")
23 }
24 })
25}

Callers

nothing calls this directly

Calls 2

AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…