MCPcopy Create free account
hub / github.com/chromium/crashpad / LoadTestModule

Function LoadTestModule

snapshot/linux/test_modules.cc:255–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255ScopedModuleHandle LoadTestModule(const std::string& module_name,
256 const std::string& module_soname) {
257 base::FilePath module_path(
258 TestPaths::Executable().DirName().Append(module_name));
259
260 if (!WriteTestModule(module_path, module_soname)) {
261 return ScopedModuleHandle(nullptr);
262 }
263 EXPECT_TRUE(IsRegularFile(module_path));
264
265 ScopedModuleHandle handle(
266 dlopen(module_path.value().c_str(), RTLD_LAZY | RTLD_LOCAL));
267 EXPECT_TRUE(handle.valid())
268 << "dlopen: " << module_path.value() << " " << dlerror();
269
270 EXPECT_TRUE(LoggingRemoveFile(module_path));
271
272 return handle;
273}
274
275} // namespace test
276} // namespace crashpad

Callers 3

TESTFunction · 0.85
TESTFunction · 0.85
MultiprocessChildMethod · 0.85

Calls 7

WriteTestModuleFunction · 0.85
ScopedModuleHandleClass · 0.85
AppendMethod · 0.80
validMethod · 0.80
IsRegularFileFunction · 0.50
LoggingRemoveFileFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected