MCPcopy
hub / github.com/cilium/ebpf / createProgram

Function createProgram

helpers_test.go:166–178  ·  view source on GitHub ↗
(tb testing.TB, typ ProgramType, retval int64)

Source from the content-addressed store, hash-verified

164}
165
166func createProgram(tb testing.TB, typ ProgramType, retval int64) *Program {
167 tb.Helper()
168
169 return mustNewProgram(tb, &ProgramSpec{
170 Name: "test",
171 Type: typ,
172 Instructions: asm.Instructions{
173 asm.LoadImm(asm.R0, retval, asm.DWord),
174 asm.Return(),
175 },
176 License: "MIT",
177 }, nil)
178}
179
180var basicProgramSpec = &ProgramSpec{
181 Name: "test",

Callers 3

TestProgramRunEmptyDataFunction · 0.85

Calls 3

LoadImmFunction · 0.92
ReturnFunction · 0.92
mustNewProgramFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…