(t *testing.T)
| 80 | } |
| 81 | |
| 82 | func 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 | |
| 101 | func TestProcessCallstackPeExports(t *testing.T) { |
| 102 | r := new(MockResolver) |
nothing calls this directly
no test coverage detected