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

Function assertMapValueGE

link/kprobe_test.go:379–387  ·  view source on GitHub ↗
(t *testing.T, m *ebpf.Map, k, v uint32)

Source from the content-addressed store, hash-verified

377}
378
379func assertMapValueGE(t *testing.T, m *ebpf.Map, k, v uint32) {
380 var val uint32
381 if err := m.Lookup(k, &val); err != nil {
382 t.Fatal(err)
383 }
384 if val < v {
385 t.Fatalf("unexpected value: want >= '%d', got '%d'", v, val)
386 }
387}
388
389func TestKprobeCookie(t *testing.T) {
390 testutils.SkipOnOldKernel(t, "5.15", "bpf_perf_link")

Callers 5

TestUprobeProgramCallFunction · 0.85
TestKprobeProgramCallFunction · 0.85

Calls 1

LookupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…