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

Function TestNestedMapPin

map_test.go:483–500  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

481}
482
483func TestNestedMapPin(t *testing.T) {
484 m := createMapInMap(t, ArrayOfMaps, Array)
485
486 tmp := testutils.TempBPFFS(t)
487
488 path := filepath.Join(tmp, "nested")
489 if err := m.Pin(path); err != nil {
490 t.Fatal(err)
491 }
492 m.Close()
493
494 m, err := LoadPinnedMap(path, nil)
495 testutils.SkipIfNotSupported(t, err)
496 if err != nil {
497 t.Fatal(err)
498 }
499 defer m.Close()
500}
501
502func TestNestedMapPinNested(t *testing.T) {
503 if _, err := newMap(t, &MapSpec{

Callers

nothing calls this directly

Calls 6

TempBPFFSFunction · 0.92
SkipIfNotSupportedFunction · 0.92
createMapInMapFunction · 0.85
LoadPinnedMapFunction · 0.85
PinMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…