MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestLoadKernelModuleSymbolTables

Function TestLoadKernelModuleSymbolTables

pkg/symbolize/symbolizer_test.go:82–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func TestLoadKernelModuleSymbolTables(t *testing.T) {
83 r := new(MockResolver)
84 c := &config.Config{SymbolizeKernelAddresses: true}
85
86 psnap := new(ps.SnapshotterMock)
87
88 opts := uint32(sys.SymUndname | sys.SymCaseInsensitive | sys.SymAutoPublics)
89 r.On("Initialize", windows.CurrentProcess(), opts).Return(nil)
90 r.On("LoadModule", windows.CurrentProcess(), mock.Anything, mock.Anything).Return(nil)
91 r.On("UnloadModule", mock.Anything, mock.Anything)
92
93 s := NewSymbolizer(r, psnap, c, false)
94 require.NotNil(t, s)
95 defer s.Close()
96
97 r.AssertNumberOfCalls(t, "Initialize", 1)
98 r.AssertNumberOfCalls(t, "LoadModule", len(sys.EnumDevices()))
99}
100
101func TestProcessCallstackPeExports(t *testing.T) {
102 r := new(MockResolver)

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.95
EnumDevicesFunction · 0.92
NewSymbolizerFunction · 0.85

Tested by

no test coverage detected