Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: src/client/linux/minidump_writer/linux_core_dumper_unittest.cc

Issue 1761023002: Add an optional root prefix to Linux dumpers (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Remove assertions Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
diff --git a/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc b/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
index 8f6a423ee04fc4b613d9b6cbcfc32b4c04fef086..ae0c965b34d1d3d5fdbc6175c29624820f65f2bd 100644
--- a/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
+++ b/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
@@ -39,6 +39,16 @@
using namespace google_breakpad;
+TEST(LinuxCoreDumperTest, GetMappingAbsolutePath) {
+ const LinuxCoreDumper dumper(getpid(), "core", "/tmp", "/mnt/root");
+ const MappingInfo mapping = { 0, 0, 0, false, "/usr/lib/libc.so" };
+
+ char path[PATH_MAX];
+ dumper.GetMappingAbsolutePath(mapping, path);
+
+ EXPECT_STREQ("/mnt/root/usr/lib/libc.so", path);
+}
+
TEST(LinuxCoreDumperTest, BuildProcPath) {
const pid_t pid = getpid();
const char procfs_path[] = "/procfs_copy";
« no previous file with comments | « src/client/linux/minidump_writer/linux_core_dumper.cc ('k') | src/client/linux/minidump_writer/linux_dumper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698