diff options
Diffstat (limited to 'src/common/linux/tests')
-rw-r--r-- | src/common/linux/tests/crash_generator.cc | 7 | ||||
-rw-r--r-- | src/common/linux/tests/crash_generator.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/common/linux/tests/crash_generator.cc b/src/common/linux/tests/crash_generator.cc index 59aced27..c78b793e 100644 --- a/src/common/linux/tests/crash_generator.cc +++ b/src/common/linux/tests/crash_generator.cc @@ -46,6 +46,7 @@ #include "common/linux/eintr_wrapper.h" #include "common/tests/auto_tempdir.h" #include "common/tests/file_utils.h" +#include "common/using_std_string.h" namespace { @@ -97,11 +98,11 @@ bool CrashGenerator::HasDefaultCorePattern() const { buffer_size == 5 && memcmp(buffer, "core", 4) == 0; } -std::string CrashGenerator::GetCoreFilePath() const { +string CrashGenerator::GetCoreFilePath() const { return temp_dir_.path() + "/core"; } -std::string CrashGenerator::GetDirectoryOfProcFilesCopy() const { +string CrashGenerator::GetDirectoryOfProcFilesCopy() const { return temp_dir_.path() + "/proc"; } @@ -170,7 +171,7 @@ bool CrashGenerator::CreateChildCrash( } if (SetCoreFileSizeLimit(kCoreSizeLimit)) { CreateThreadsInChildProcess(num_threads); - std::string proc_dir = GetDirectoryOfProcFilesCopy(); + string proc_dir = GetDirectoryOfProcFilesCopy(); if (mkdir(proc_dir.c_str(), 0755) == -1) { perror("CrashGenerator: Failed to create proc directory"); exit(1); diff --git a/src/common/linux/tests/crash_generator.h b/src/common/linux/tests/crash_generator.h index d05ce73d..7e2fcbf9 100644 --- a/src/common/linux/tests/crash_generator.h +++ b/src/common/linux/tests/crash_generator.h @@ -38,6 +38,7 @@ #include <string> #include "common/tests/auto_tempdir.h" +#include "common/using_std_string.h" namespace google_breakpad { @@ -59,10 +60,10 @@ class CrashGenerator { bool HasDefaultCorePattern() const; // Returns the expected path of the core dump file. - std::string GetCoreFilePath() const; + string GetCoreFilePath() const; // Returns the directory of a copy of proc files of the child process. - std::string GetDirectoryOfProcFilesCopy() const; + string GetDirectoryOfProcFilesCopy() const; // Creates a crash (and a core dump file) by creating a child process with // |num_threads| threads, and the terminating the child process by sending |