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

Function TestProgramInfoMapIDsNoMaps

info_test.go:338–355  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

336}
337
338func TestProgramInfoMapIDsNoMaps(t *testing.T) {
339 prog := createBasicProgram(t)
340
341 info, err := prog.Info()
342 testutils.SkipIfNotSupported(t, err)
343 qt.Assert(t, qt.IsNil(err))
344
345 ids, ok := info.MapIDs()
346 switch {
347 case testutils.IsVersionLessThan(t, "4.15", "windows:0.20"):
348 qt.Assert(t, qt.IsFalse(ok))
349 qt.Assert(t, qt.HasLen(ids, 0))
350
351 default:
352 qt.Assert(t, qt.IsTrue(ok))
353 qt.Assert(t, qt.HasLen(ids, 0))
354 }
355}
356
357func TestScanFdInfoReader(t *testing.T) {
358 tests := []struct {

Callers

nothing calls this directly

Calls 6

SkipIfNotSupportedFunction · 0.92
IsVersionLessThanFunction · 0.92
createBasicProgramFunction · 0.85
IsNilMethod · 0.80
MapIDsMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…