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

Function NativeFile

internal/testutils/glob.go:65–77  ·  view source on GitHub ↗

NativeFile substitutes %s with an abbreviation of the host endianness.

(tb testing.TB, path string)

Source from the content-addressed store, hash-verified

63
64// NativeFile substitutes %s with an abbreviation of the host endianness.
65func NativeFile(tb testing.TB, path string) string {
66 tb.Helper()
67
68 if !strings.Contains(path, "%s") {
69 tb.Fatalf("File %q doesn't contain %%s", path)
70 }
71
72 if cpu.IsBigEndian {
73 return fmt.Sprintf(path, "eb")
74 }
75
76 return fmt.Sprintf(path, "el")
77}

Callers 15

TestProgInfoExtBTFFunction · 0.92
TestBatchMapWithLockFunction · 0.92
TestMapWithLockFunction · 0.92
TestLoadAndAssignFunction · 0.92
TestDataSectionsFunction · 0.92
TestInlineASMConstantFunction · 0.92
TestFreezeRodataFunction · 0.92
TestLoadInvalidMapFunction · 0.92
TestStringSectionFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestProgInfoExtBTFFunction · 0.74
TestBatchMapWithLockFunction · 0.74
TestMapWithLockFunction · 0.74
TestLoadAndAssignFunction · 0.74
TestDataSectionsFunction · 0.74
TestInlineASMConstantFunction · 0.74
TestFreezeRodataFunction · 0.74
TestLoadInvalidMapFunction · 0.74
TestStringSectionFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…